Crystal Space
Welcome, Guest. Please login or register.
November 18, 2017, 05:27:16 am

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80363 Members
Latest Member: Gaueraq9l
* 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 3677 times)
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"??

1800MHz Intel Centrino
128 ATI Mobility Radeon X700
Win XP Pro SP2
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
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 5.221 seconds with 16 queries.