T3rr4Byt3
Member
|
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 |
|
Harry
Member
|
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 |
|
T3rr4Byt3
Member
|
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 |
|