You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A friend was just commenting the other day about how Wowser looks great, but is lacking in the gameplay department. 😛
Let's fix that with some rudimentary collision detection for the player!
For now, let's skip the trickier parts of collision, and just deal with basic terrain collisions.
Progress
Check terrain intersections for the destination position when player navigates
Prior to actually moving, but after the move event is triggered, we should calculate the terrain intersections for the down vector (0, 0, -1) at the destination position. We should then grab the Z position of any intersected terrain, and calculate the angle between the original unit position and the new position clamped to the Z position of the intersected terrain. Finally, we should return the new Z position and the angle value.
Deny movement with overly steep 'up' angle
Any attempted movement in excess of some angle should be prevented.
Trigger falling for movement with overly steep 'down' angle
Any attempted movement with a 'down' angle in excess of some value should cause falling. For now, falling can simply consist of lerping from [destination position without collision Z position applied] to the [destination position with collision Z value applied]. Not sure how we want to animate this, exactly.
The text was updated successfully, but these errors were encountered:
A friend was just commenting the other day about how Wowser looks great, but is lacking in the gameplay department. 😛
Let's fix that with some rudimentary collision detection for the player!
For now, let's skip the trickier parts of collision, and just deal with basic terrain collisions.
Progress
Prior to actually moving, but after the move event is triggered, we should calculate the terrain intersections for the down vector (0, 0, -1) at the destination position. We should then grab the Z position of any intersected terrain, and calculate the angle between the original unit position and the new position clamped to the Z position of the intersected terrain. Finally, we should return the new Z position and the angle value.
Any attempted movement in excess of some angle should be prevented.
Any attempted movement with a 'down' angle in excess of some value should cause falling. For now, falling can simply consist of lerping from [destination position without collision Z position applied] to the [destination position with collision Z value applied]. Not sure how we want to animate this, exactly.
The text was updated successfully, but these errors were encountered: