frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

(HELP) How do I make it so my character doesnt rotate but I can look in different directions

I am making a game where the mouse pointer is where the bullets go if you shoot. but I do not want the physical appearance of my character to rotate. How do I do this?

Comments

  • create a weapon item and have it rotate where the mouse is at, you then use an attacher to attach it to the character
  • Make the mouse coordinates go directly to a camera block @SPARKKING
  • edited March 8
    So you want a weapon that fires in the mouse’s direction,


    What @MagmaDude100 said works, but theirs a faster and easier solution.

    Alright, use a mousemove, and there’s this behavior bundle that Grazer made “Angleto”
    {"behavior":{"links":[{"output_id":"d09674e52c2d584co0","input_id":"d096deb8fd88e849i0"},{"output_id":"d096ae0710bfa744o0","input_id":"d096db35e1ddfc43i0"},{"output_id":"d09886fa0ae4994do0","input_id":"d0954992bf780a48i0"},{"output_id":"d096deb8fd88e849o0","input_id":"d09886fa0ae4994di0"},{"output_id":"d0951aa1d578ba4bo0","input_id":"d096ae0710bfa744i0"},{"output_id":"d0951aa1d578ba4bo0","input_id":"d096db35e1ddfc43i1"},{"output_id":"d0951aa1d578ba4bo0","input_id":"d096db35e1ddfc43i2"},{"output_id":"d095057808ba184do0","input_id":"d09674e52c2d584ci0"},{"output_id":"d095057808ba184do0","input_id":"d096deb8fd88e849i1"},{"output_id":"d095057808ba184do0","input_id":"d096deb8fd88e849i2"},{"output_id":"d096db35e1ddfc43o0","input_id":"d09886fa0ae4994di1"},{"output_id":"d096db35e1ddfc43o0","input_id":"d09886fa0ae4994di2"}],"nodes":[{"name":"AngleTo","behaviorType":"logic.NodeGroup","outputCount":1,"id":"d094c815beca0543","y":256,"isMenuItem":false,"x":360,"inputCount":2,"group":""},{"targetId":0,"name":"Extractor","behaviorType":"logic.properties.Extractor","outputCount":1,"id":"d09674e52c2d584c","y":96,"x":180,"prop":"x","inputCount":1,"group":"d094c815beca0543"},{"targetId":0,"name":"Extractor","behaviorType":"logic.properties.Extractor","outputCount":1,"id":"d096ae0710bfa744","y":288,"x":180,"prop":"y","inputCount":1,"group":"d094c815beca0543"},{"portId":"d094c815beca0543o0","name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","outputCount":0,"id":"d0954992bf780a48","y":288,"x":720,"tag":"angle","inputCount":1,"group":"d094c815beca0543"},{"x":540,"y":288,"default1":0,"tag":"","id":"d09886fa0ae4994d","name":"Expression","behaviorType":"logic.logic.Expression","outputCount":1,"inputCount":3,"expression":"90-(Math.atan2(A,B)/Math.PI) * 180","default0":0,"group":"d094c815beca0543"},{"x":360,"y":160,"default1":0,"tag":"","id":"d096deb8fd88e849","name":"Expression","behaviorType":"logic.logic.Expression","outputCount":1,"inputCount":3,"expression":"B-A","default0":0,"group":"d094c815beca0543"},{"portId":"d094c815beca0543i1","name":"Bundle Input","behaviorType":"logic.NodeGroupInput","outputCount":1,"id":"d0951aa1d578ba4b","y":352,"x":0,"tag":"y","inputCount":0,"group":"d094c815beca0543"},{"portId":"d094c815beca0543i0","name":"Bundle Input","behaviorType":"logic.NodeGroupInput","outputCount":1,"id":"d095057808ba184d","y":192,"x":0,"tag":"x","inputCount":0,"group":"d094c815beca0543"},{"x":360,"y":384,"default1":0,"tag":"","id":"d096db35e1ddfc43","name":"Expression","behaviorType":"logic.logic.Expression","outputCount":1,"inputCount":3,"expression":"B-A","default0":0,"group":"d094c815beca0543"}],"v":"2"}}
    and then you have your emit

    Go into the emit, and check “independent rotation”

    Connect the angleto bundle to the “angle” input on the emit, and connect X and y to their specific spots on the angleto

    Use whatever you’d like to trigger the emit. And you’re done!
  • Copy that code down, go into the editor, and import it
  • AAAAAAAAAAAAHHHH!!!!
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch