Comments (9)
If it is just about simply rotating the sprite, this can be achieved by placing
if (m_sliding)
{
float sprite_angle = 0.0f;
if (m_floor_normal.y != 0.0f)
{
sprite_angle = math::degrees(math::angle(m_floor_normal)) + 90.0f;
}
m_sprite->set_angle(sprite_angle);
}
Around line 1436 in player.cpp (probably also other places possible). The result would be the following:
Supertux-Sliding-Angle.mp4
This would not rotate the hitbox, just the sprite of Tux.
It also does not include a "smooth transition" right now, which is most likely a bit more complex to implement.
If the above behavior would be Ok as a first step, I could create a PR if you like.
from supertux.
Dependent on (#1448)
from supertux.
Dependent on (#1448)
The sprite isn't dependent on the hitbox.
from supertux.
This would also requires smooth transitioning / blending between orientations which are impacted by velocity / acceleration. This could be done via interpolation, easing, dynamic effect (blender animation suite terminology) and by plugging in the variables.
from supertux.
Fuck yeah, this is already more awesome than what we have in the game.
from supertux.
I created a PR that, additionally to the above mentioned changes, also uses Tux' velocity for sprite orientation in case you jump off an edge while sliding.
from supertux.
THIS IS PEAK
from supertux.
Supertux-Sliding-Angle.mp4
hold om this gives me a genius idea. we can have level design based on this new mechanic where tux has to slide to generate momentum and then fly off an edge to get over a gap like in https://apps.apple.com/gb/app/racing-penguin-slide-and-fly/id443637419
from supertux.
there should also be particle effects depending on the environment!
from supertux.
Related Issues (20)
- Small "shaky" pause when dying HOT 8
- Node preset patterns for path node objects. HOT 1
- Sound Object plays sounds of all sectors at once HOT 2
- `Text.set_centered(true)` is broken
- Possibility to get out of the normal range in the yeti end level HOT 3
- WASM on IOS not working HOT 1
- Couldn't mount levels from the user directory '/home/web_user/.local/share/supertux2/' to PhysFS searchpath: not found HOT 1
- Door wont open if offscreen HOT 3
- Bug Report: Unreadable/Unintelligible Options in the Game HOT 4
- Dispensers spawn two objects once loaded in HOT 1
- Issues with gradients and camera zoom HOT 5
- [Fullscreen] Serious screen tearing with cave levels
- "Missing Texture" in world map "Industrial Island" HOT 8
- Crash when switching to new world within a world map HOT 2
- [Jump With Up] Impossible to jump out of the rope
- "Missing Texture" and wrong rendering in various world maps
- VSync setting is not saved and resets upon restart
- Revert or greatly improve rotating Tux on slopes HOT 11
- windows 0.6.3 font is ? HOT 2
- Issues with Granitos HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supertux.