top of page

Learning Curve 2

  • kjcoleman7
  • Oct 6, 2016
  • 1 min read

Opening a door My next issue was finding a way of opening a door. The level came pre-made with some doors already opened from an imaginary hinge on the left of the object.

Problem Animating the motion of opening a door this way became a bit of an issue for me because Unreal does not seem to allow the pivot point of an object to be set separately from the centre of mass, which meant that the 'Rotate' function would rotate the door around its centre point as shown in the image below.

A search online suggested that objects that are intended to be rotated this way should be exported from the modelling software with the centre point already offset.

Solution 'Rotating Component' This component can be added from the details panel and contains a 'Pivot Translation' option. This allows for the pivot point of the object to be moved based on local co-ordinates.

Making this component interactive so that the object does not rotate indefinitely required the use of an 'AddRotatingMovementComponent' node in the blueprint, and instantiating and deactivating this component using an event track in a timeline. I tested the results by setting the motion to respond to a key press. The blueprint can be seen in the image below.

Final Result:

There seem to be a lot of component options that are manipulable in this way. I'll be having a look at a few more of these next.


 
 
 

Comments


Recent Posts
bottom of page