R2 collision detection

For discussions about the Rayman series.
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Post Reply
Hugo
Grand Minimus
Posts: 443
Joined: Fri Jun 07, 2024 8:58 am
Tings: 5335

R2 collision detection

Post by Hugo »

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?
hoodlumsworld
El Stomacho (good)
Posts: 1572
Joined: Mon Jun 15, 2020 1:12 am
Tings: 23026

Re: R2 collision detection

Post by hoodlumsworld »

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.
Hugo
Grand Minimus
Posts: 443
Joined: Fri Jun 07, 2024 8:58 am
Tings: 5335

Re: R2 collision detection

Post by Hugo »

Thanks!

This collision detection stuff is all very complex and confusing.
Post Reply