Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 14 15 16 17 18 Next »
applyTorque bug
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
applyTorque bug
11-11-2014, 07:41 AM,
#1
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
applyTorque bug
Hey,

For some reason when I touch the SF chip using physgun the SF chip just dissapears / breaks. When I touch it using prop or gravitygun it work just fine.

Im using following code

Code:
V2=Entity:toLocal(quaternion.rotationVector(quaternion.qRotation(Entity:angVelVector())+quaternion.qRotation(Entity:pos()))) Entity:applyTorque((150*V2-13*Entity:pos()*Entity:mass())*Entity:inertia())

and yes I have tried with smaller forces. Removing applytorque from the chip fixed the issue but well thats not a solution.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
11-11-2014, 08:35 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: applyTorque bug
Potential issues:
1. Apply torque is a hack with offset forces because there's no binding to torque in GLua.
2. The physgun applies a constraint to objects it picks up rather than locking their position/angles, so it's possible it spazzes when also under the effect of potentially strong forces thanks to VPhysics brilliant constraints.
3. The rotation vector you're using looks suspect (qRotation(Entity:pos() part in particular), as does the Entity:pos() in the torque (seeing as torque is just a normal to rotate around and its magnitude is the force amount, so Entity:pos() is a pretty strange thing to include) but I'm not awake enough to go over it right now.

Likely 3 is the real problem.
Find
Reply
11-11-2014, 09:54 PM,
#3
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
RE: applyTorque bug
(11-11-2014, 08:35 PM)Person8880 Wrote: Potential issues:
1. Apply torque is a hack with offset forces because there's no binding to torque in GLua.
2. The physgun applies a constraint to objects it picks up rather than locking their position/angles, so it's possible it spazzes when also under the effect of potentially strong forces thanks to VPhysics brilliant constraints.
3. The rotation vector you're using looks suspect (qRotation(Entity:pos() part in particular), as does the Entity:pos() in the torque (seeing as torque is just a normal to rotate around and its magnitude is the force amount, so Entity:pos() is a pretty strange thing to include) but I'm not awake enough to go over it right now.

Likely 3 is the real problem.

The problem remais even if I remove Entity:pos() part.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.