working on ship keel

This commit is contained in:
Dave Schuyler 2006-02-08 22:50:39 +00:00
parent eec9125b58
commit ad2bab372c
1 changed files with 16 additions and 8 deletions

View File

@ -332,14 +332,22 @@ class ShipPilot2(PhysicsWalker):
self.phys.addLinearForce(buoyancy)
self.buoyancyStarboard = buoyancy
fn=ForceNode("ship keel")
fnp=NodePath(fn)
#fnp.reparentTo(physicsActor)
fnp.reparentTo(render)
self.nodes.append(fnp)
self.keel=AngularVectorForce(0.0, 0.0, 0.0)
fn.addForce(self.keel)
self.phys.addAngularForce(self.keel)
if 0:
fn=ForceNode("ship keel")
fnp=NodePath(fn)
fnp.reparentTo(avatarNodePath)
self.nodes.append(fnp)
self.keel=AngularVectorForce(0.0, 0.0, 0.0)
fn.addForce(self.keel)
avatarNodePath.node().getPhysical(0).addAngularForce(self.keel)
else:
fn=ForceNode("ship keel")
fnp=NodePath(fn)
fnp.reparentTo(render)
self.nodes.append(fnp)
self.keel=AngularVectorForce(0.0, 0.0, 0.0)
fn.addForce(self.keel)
self.phys.addAngularForce(self.keel)
fn=ForceNode("ship priorParent")
fnp=NodePath(fn)