Hello, I'm making an E2 homing launcher, and everything is pretty much done, except that when I use toAngle() to get the angle for the part to shift direction, it rotates by the side, which is it's front face. How can I make it so up face is the one to direct (very confusing)
Here's the code Ent being player, Entity being prop :
Entity:setAng( (Ent:pos() + vec(0, 0, 40) - Entity:pos()):toAngle() )
Here's a photo of a representation:
https://files.facepunch.com/forum/upload/435186/30ed5b70-0dbe-4952-8681-3605c1980658/image.png
Im not too experienced in E2, but is there afunction to rotate the object? Like SetRot() etc. There you could probably rotate it by 90 degrees, and your good to go
I tried multiplying angles but it never seems to work 360 degrees.
You mean something to minge around with. The only sandbox servers using bigcity are build&kill M9K minge servers after all.
I had permission from the owner, to build it on their server and test it there. If you're not going to help you can leave. Thank you.
thats not how it works here. You will figure that out soon enough
Whether or not you just wanted to "test" it, it's a device you intend to use for minging around. And thus, it shouldn't be supported by giving you assistance on how to make that.
I understand what you mean, I was bored and wanted to do something, I just didn't get why It's not facing the right direction, Asking for a homing missile or not, asking for the same thing except the homing launcher part, someone would help...
Sounds like this might be as simple as changing the vector you're adding to affect something other than the roll component of the angle. From your code, it's hard for me to understand what you're atetmpting to do, but "+vec(0,0,40)" can be changed to include that 40 somewhere else and pitching or yawing the prop differently.
The adding a vector is because the position of the player is on his feet, so I'm making the position on the chest.
Oh I see, have you tried playing around with the :shiftL() and :shiftR() functions to shift vector components around? There might be a solution in those.
Sorry, you need to Log In to post a reply to this thread.