I have a question about collision detection about Rayman 2.
Does the engine check if an object will collide and then 'forbid' it before it happens? Or, does it allow penetration and instantly push the objects apart?
R2 collision detection
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
-
hoodlumsworld

- Posts: 1572
- Joined: Mon Jun 15, 2020 1:12 am
- Tings: 23026
Re: R2 collision detection
I'm no expert on this, but my understanding is that the OpenSpace engine uses a "forbid" style of collision. Basically, it calculates Rayman's movement for the next frame, and if he's about to hit a wall ("geom"), it just projects his vector along it so he slides rather than bounces.
I assume this is why speedrunning tricks like wall clips work? If you move fast enough to pass completely through a mesh in a single frame, the engine never sees the collision. And since it doesn't seem to have a modern physics solver to push you back out, you just end up falling into the void or getting stuck.
I assume this is why speedrunning tricks like wall clips work? If you move fast enough to pass completely through a mesh in a single frame, the engine never sees the collision. And since it doesn't seem to have a modern physics solver to push you back out, you just end up falling into the void or getting stuck.
Re: R2 collision detection
Thanks!
This collision detection stuff is all very complex and confusing.
This collision detection stuff is all very complex and confusing.
