mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
changed to ray start global
This commit is contained in:
parent
35f04984c1
commit
2092a17028
@ -175,7 +175,7 @@ class GravityWalker(DirectObject.DirectObject):
|
|||||||
# a higher or lower value depending on whether you want an avatar
|
# a higher or lower value depending on whether you want an avatar
|
||||||
# that is outside of the world to step up to the floor when they
|
# that is outside of the world to step up to the floor when they
|
||||||
# get under valid floor:
|
# get under valid floor:
|
||||||
cRay = CollisionRay(0.0, 0.0, 4000.0, 0.0, 0.0, -1.0)
|
cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)
|
||||||
cRayNode = CollisionNode('GW.cRayNode')
|
cRayNode = CollisionNode('GW.cRayNode')
|
||||||
cRayNode.addSolid(cRay)
|
cRayNode.addSolid(cRay)
|
||||||
self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode)
|
self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode)
|
||||||
|
@ -74,7 +74,7 @@ class NonPhysicsWalker(DirectObject.DirectObject):
|
|||||||
# a higher or lower value depending on whether you want an avatar
|
# a higher or lower value depending on whether you want an avatar
|
||||||
# that is outside of the world to step up to the floor when they
|
# that is outside of the world to step up to the floor when they
|
||||||
# get under valid floor:
|
# get under valid floor:
|
||||||
self.cRay = CollisionRay(0.0, 0.0, 4000.0, 0.0, 0.0, -1.0)
|
self.cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)
|
||||||
cRayNode = CollisionNode('NPW.cRayNode')
|
cRayNode = CollisionNode('NPW.cRayNode')
|
||||||
cRayNode.addSolid(self.cRay)
|
cRayNode.addSolid(self.cRay)
|
||||||
self.cRayNodePath = avatarNodePath.attachNewNode(cRayNode)
|
self.cRayNodePath = avatarNodePath.attachNewNode(cRayNode)
|
||||||
|
@ -120,7 +120,7 @@ class PhysicsWalker(DirectObject.DirectObject):
|
|||||||
def setupRay(self, floorBitmask, floorOffset):
|
def setupRay(self, floorBitmask, floorOffset):
|
||||||
# This is a ray cast from your head down to detect floor polygons
|
# This is a ray cast from your head down to detect floor polygons
|
||||||
# A toon is about 4.0 feet high, so start it there
|
# A toon is about 4.0 feet high, so start it there
|
||||||
self.cRay = CollisionRay(0.0, 0.0, 4.0, 0.0, 0.0, -1.0)
|
self.cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)
|
||||||
cRayNode = CollisionNode('PW.cRayNode')
|
cRayNode = CollisionNode('PW.cRayNode')
|
||||||
cRayNode.addSolid(self.cRay)
|
cRayNode.addSolid(self.cRay)
|
||||||
self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode)
|
self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user