About Store Forum Documentation Contact



Post Reply 
Maybe a BUG while updating camera with enabled ragdoll
Author Message
T3rr4Byt3 Offline
Member

Post: #1
Maybe a BUG while updating camera with enabled ragdoll
Hi,

I found maybe a bug while you are updating the free camera while
you are using ragdoll with the player who is target by the camera.
( Source file: 17 - Camera Collisions.h )

I´m using this update function for collision for my free- and thrid- person view. They work all great so I didnt have any problems with them.

But when I enable the ragdoll ( doesnt matter partially or full ) - the camera stuck inside the mesh.

You can reproduce it with that source file when you add this to Update():

if (Kb.b(KB_V)) Players[0].ragdollBlend();

When you are pushing V - the camera stuck inside the mesh - you cant move the camera out of it. But when you release the button - the camera works again.

I located the possible bug in " desired_camera.at =Players[0].pos(); "
- When you set other positions for the camera it will work even when the ragdolls are enabled.

I debuged the values from Players[0].pos() - ctrl.actor.pos - cskel.pos. These values are almost the same during enabled ragdoll. So there are no changes which can "create" the bug.

I dont know but I guess "Physics.move(ball, desired_camera.matrix.pos-ball.pos);" is also suspect. I dont know what happend behind that code - so I cant debug it.

So do you have any suggestions?

Regards.






-
10-05-2012 10:03 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #2
RE: Maybe a BUG while updating camera with enabled ragdoll
Put this line before camera code:

Code:
if(Players.elms())
{
Bool ragdollCollisions=Players[0].ragdoll.collision();
Players[0].ragdoll.collision(false);
...

and after Cam.updateVelocities().set(); put this:

Code:
Players[0].ragdoll.collision(ragdollCollisions);
(This post was last modified: 10-06-2012 10:26 AM by Harry.)
10-06-2012 10:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
T3rr4Byt3 Offline
Member

Post: #3
RE: Maybe a BUG while updating camera with enabled ragdoll
Hi,

wow thank you so much Harry, that code works great.

I didnt find any information about this behavior - was that only my stupidity?

Thanks again.
10-06-2012 11:58 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #4
RE: Maybe a BUG while updating camera with enabled ragdoll
(10-06-2012 11:58 AM)T3rr4Byt3 Wrote:  I didnt find any information about this behavior - was that only my stupidity?

Few years ago I had the same problem, but Esenthel gave me this hint so I think the answer is "no" smile
(This post was last modified: 10-06-2012 05:03 PM by Harry.)
10-06-2012 05:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply