Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Rotate a whole model to face you?

Asked by
Omarstein 100
10 years ago

First of all, this isn't a request. All I need is hints, or links to the wiki.

I'm currently working on a part of my game where a monster would teleport to the player and look at him (more like a jumpscare). I've got the teleporting part implemented, but whenever the monster teleports to a player he would be looking in a different direction, is there a way I could rotate the whole model to face him when he has teleported? All suggestions are appreciated! Thank you!

1 answer

Log in to vote
1
Answered by
RoboFrog 400 Moderation Voter
10 years ago

This is rather difficult to truly code in. If you want the fully coded way, then I can try to help, however, the next way is the "shortcut".

The way that I usually do it is place a RocketPropulsion into the model, and whenever it's teleported, Fire() it, and after about a second, Abort() it. Change TurnP to match however fast you want it to turn. Make sure that all of the factors affecting speed are 0.

0
Just read about RocketPropulsion, looks great, but would it still work if the all the parts inside the model were anchored? Or should I unanchor and weld them? Omarstein 100 — 10y
1
They'd need to be unanchored and unwelded (unwelded to the ground, not to themselves), but if you have all the speed factors set to 0, it won't move anywhere else. RoboFrog 400 — 10y
0
Got it working! Thanks a lot! Accepted the answer! Omarstein 100 — 10y
0
Alright, good to hear! Happy to help. RoboFrog 400 — 10y
Ad

Answer this question