Crystal Space
Welcome, Guest. Please login or register.
August 02, 2014, 05:44:27 am

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8273 Members
Latest Member: Ai16x2t
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  Explanation of iPcCollisionDetection::AdjustForCollisions
« previous next »
Pages: [1] Print
Author Topic: Explanation of iPcCollisionDetection::AdjustForCollisions  (Read 2531 times)
kiper
Newbie
*
Posts: 17


View Profile Email
« on: May 26, 2006, 05:23:14 pm »

virtual bool iPcCollisionDetection::AdjustForCollisions     (      csVector3 &       oldpos,
      csVector3 &     newpos,
      csVector3 &     vel,
      float     delta,
      iMovable *     movable
   )     [pure virtual]
     

This function takes a position vector, checks against all known colliders, and returns the adjusted position in the same variable.




This function is to calculate the correct position to place the mesh, right?
But what is it for "vel" and "delta"??
Logged

1800MHz Intel Centrino
1GB RAM
128 ATI Mobility Radeon X700
Win XP Pro SP2
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #1 on: June 05, 2006, 08:44:27 pm »

It seems to be just a stub to csColliderActor::AdjustForCollisions(), which
apparently is used compute a new position depending on collision (ie. bounce back if object hits a wall).
vel would be the velocity at which the object is travelling toward newpos
delta would be the elapsed time since you were at oldpos
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.22 seconds with 17 queries.