Not quite sure what you're asking here. There's a function E:velL() that returns the vector of the speed relative to the entity, I think E:velL():z() would give you the up/down velocity of the entity.
I've been playing with the idea of having a drone above your head, resulting in this expression:
The problem is that I have no idea to check the velocity of EE:up(), so it wobbles more and more until it's just spinning randomlyCode:@name Evil Hyvel interval(10) EE=entity(),EA=EE:angVel() EV=EE:pos(),EU=EE:up() TV = entity():owner():pos() + vec(0,0,150) + entity():owner():vel()/8 TL = entity():owner():aimPos() #Forces applyForce((TV-EV-EE:vel()/10)*entity():mass()) #Above head applyOffsetForce((TL-TV)/1000, EV+EU) #Aim, needs some sort of delta applyOffsetForce(-(TL-TV)/1000, EV-EU)} #Aim, needs some sort of delta
Not quite sure what you're asking here. There's a function E:velL() that returns the vector of the speed relative to the entity, I think E:velL():z() would give you the up/down velocity of the entity.
I want to get the velocity of entity():up(), not the Z velocity
Delta works on vectors.
However, know that the vector doesn't become properly interpolated, so you need to normalize it yourself to get somewhat proper readings.Code:if(entity():up() != Up) { Up = entity():up() Velocity = $Up }
... BUT, I'd say it is far better to use the velocity() (and angular velocity) functions for the entity(), they are more accurate and basically better in every way.
Bookmarks