mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
moved collision sphere
This commit is contained in:
parent
01b7f3acaa
commit
dc02cb5d11
@ -163,11 +163,8 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
|
|||||||
"""
|
"""
|
||||||
# This is a sphere on the ground to detect barrier collisions
|
# This is a sphere on the ground to detect barrier collisions
|
||||||
self.avatarRadius = avatarRadius
|
self.avatarRadius = avatarRadius
|
||||||
centerHeight = avatarRadius
|
self.cSphere = CollisionSphere(0.0, 0.0, 0.0, avatarRadius)
|
||||||
if self.useHeightRay:
|
cSphereNode = CollisionNode('SP.cSphereNode')
|
||||||
centerHeight *= 2.0
|
|
||||||
self.cSphere = CollisionSphere(0.0, 0.0, centerHeight, avatarRadius)
|
|
||||||
cSphereNode = CollisionNode('PW.cSphereNode')
|
|
||||||
cSphereNode.addSolid(self.cSphere)
|
cSphereNode.addSolid(self.cSphere)
|
||||||
self.cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode)
|
self.cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode)
|
||||||
self.cSphereBitMask = bitmask
|
self.cSphereBitMask = bitmask
|
||||||
|
Loading…
x
Reference in New Issue
Block a user