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

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
1 2 3 4 5 … 18 Next »
Questions and Documentation Requests
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Questions and Documentation Requests
19-04-2019, 05:11 PM, (This post was last modified: 19-04-2019, 05:42 PM by Sir_Cuddles. Edited 4 times in total.)
#7
Sir_Cuddles Offline
TSCM Member
***
Posts: 4
Threads: 1
Joined: Apr 2019
RE: Questions and Documentation Requests
I was looking at "https://www.teamscm.co.uk/sfdoc/libraries/quaternion.html"

I did not know the editor had a documentation tab, I just found it and this has a lot more information that I will definitely be reading through. Here is were I am using quaternions in my code, there is a chance that it might be something else that isn't working:

Code:
local QAng = E:toLocal(quaternion.rotationVector(quaternion.New(Ang)/quaternion.New(E))+E:pos()) EP:applyTorqueCenter((250*QAng-25*EP:getAngleVelocity())*EP:getInertia())
E is the entity, and EP is the entities physics object.

EDIT: I just checked the documentation tab and I do not see either cross or dot product in it. As for the link you posted, when I tried "V1:cross(V2)" it was just an error, the reason why I want cross product is because of the following function I am making because I can not get the quaternions to work:

Code:
function aimEnt( E, Dir ) local EP = E:getPhysicsObject() local EDir = E:forward() local AimVec = crossV(crossV(EDir,Dir - EDir),EDir) EP:applyForceOffset((AimVec + 5*deltaV(AimVec))*EP:getMass()*100,E:pos() + EDir*5) end

The code works with my custom functions but if I use the V1:cross(V2) it just gives an error
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Questions and Documentation Requests - by Person8880 - 08-05-2015, 07:38 PM
RE: Questions and Documentation Requests - by Person8880 - 08-05-2015, 08:06 PM
RE: Questions and Documentation Requests - by Liizzii - 05-02-2016, 01:00 PM
RE: Questions and Documentation Requests - by Person8880 - 05-02-2016, 06:37 PM
RE: Questions and Documentation Requests - by Sir_Cuddles - 19-04-2019, 03:47 PM
RE: Questions and Documentation Requests - by Person8880 - 19-04-2019, 04:53 PM
RE: Questions and Documentation Requests - by Sir_Cuddles - 19-04-2019, 05:11 PM
RE: Questions and Documentation Requests - by Person8880 - 19-04-2019, 06:58 PM
RE: Questions and Documentation Requests - by Sir_Cuddles - 19-04-2019, 07:06 PM

  • 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.