making a character immovable?

allc1865allc1865 Member, PRO Posts: 777
Hey guys,

I need help making my enemy character immovable because (1) when the player actor collides with them they go sailing off somewhere else, and (2) the enemies will move by themselves without me even colliding with them.
I've tried turning my density way up, but that just ends up crashing my game.
Any help will be great, please. Thank you in advance.

Best Answers

  • SocksSocks London, UK.Posts: 12,822
    Accepted Answer
    image
  • tahakitantahakitan Posts: 102
    edited December 2013 Accepted Answer
    if movable is checked than it is always going to move if you have a collide rule applied with it. you can reduce the movement of the object by adding a constraint attribute to the x and y but it will move a few pixels when you collide with it.

Answers

  • allc1865allc1865 Member, PRO Posts: 777
    When I collide with them they still move.
    @Socks
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2013
    No, not if you uncheck 'moveable'.
  • allc1865allc1865 Member, PRO Posts: 777
    I checked movable because I need the actor enemies to rotate wherever the player goes. They're sitting still but they rotate around where ever the player goes.
  • allc1865allc1865 Member, PRO Posts: 777
    edited December 2013
    Here's what's inside my Physics tab:

    image

    I have fixed rotation and moveable checked so that they can rotate and follow the actor player.

    Thanks, @Socks
  • allc1865allc1865 Member, PRO Posts: 777
    Okay. Thanks, everyone! I got it figured out!
  • -Timo--Timo- Member Posts: 2,313
    also if you dont want to have it pushed away but still want to move it then uncheck moveable and use the interpolate behavior to interpolate the position to another position :) (one of my first questions I couldnt figure out so I thought I would tell you so you dont need to ask :D )
  • allc1865allc1865 Member, PRO Posts: 777
    @timolapre1998, thanks for sharing!
    I am curious, how would you use the Interpolate behavior to change positions?
  • -Timo--Timo- Member Posts: 2,313
    edited December 2013
    interpolate self.position.X to 100 in 1 second.
    now he moves to x=100 in 1 second :)

    (usefull for doors, not moveable but can move :) )
  • allc1865allc1865 Member, PRO Posts: 777
    edited December 2013
    That's a good idea. Something I will definitely write down and keep.
    You could even use something like this, too maybe? :) ;)
    https://www.dropbox.com/s/74ze6s4ibfnvorv/move_Timer.zip
    @timolapre1998
  • InovaTechInovaTech Member Posts: 161
    uncheck moveable...
    I hope that helps
Sign In or Register to comment.