Announcement

Collapse
No announcement yet.

Constrain axis in a trigger box ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Constrain axis in a trigger box ?

    Hi everyone,
    I have an issue that I hope you guys can solve !
    I would like to constrain the Z axis of my character when it begin overlap a trigger box. So that it can only move to the Y axis. When it end overlap the box, the constraint goes away and the character can move freely ^^
    (My character is a rolling ball)

    I've tried many things in Blueprint but I can't figure out how to do it... I'm pretty new to unreal engine, hope there is a way to do this.
    Thanks a lot !

    #2
    Hi man,

    i never read about this kind of constrain, But
    you can surely build it up .

    For example.
    When entering the Trigger make the RollingBall, save his Z location , and a new boolean to 1, lets call it ConstrainZ.
    When leaving the trigger set the boolean back to 0
    In the tickevent, if ConstrainZ is 1, Get the RollingBall worldlocation, break it, ( get your saved Z and make another vector with this instead of standard Z ) and than set his worldlocation
    Click image for larger version

Name:	Z_Constrain_Actor.png
Views:	27
Size:	185.8 KB
ID:	1796249

    Comment


      #3
      Thanks a lot mate !
      I will try this a soon as I can

      Comment

      Working...
      X