Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make controller affect another object than the one controller is attached to
#2
You only need to override ApplyTransformRotation() and ApplyTransformPosition(), that should be sufficient. The only exception I see is when you want the controller to be able to switch splines like featured in the runner example.

In alternative, override UserAfterInit() and UserAfterUpdate() to set both position and rotation.

Edit: Examined the code and you're right, transform is used for getting rotation in Refresh(). So I consider adding GetTransformRotation() and GetTransformPosition() as new virtual methods to CurvyController.cs. If you want to modify CurvyController.cs by yourself, just add those two methods and your code should be fine after the next update. On the other side, must your GO holding the controller keep unchanged? Otherwise you could simply use UserAfterUpdate() and sync local transform to your other GO.

Also I'm curious what special purpose makes this neccessary.
Reply


Messages In This Thread
RE: How to make controller affect another object than the one controller is attached to - by Jake - 01-12-2016, 07:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create Game Object Renaming Options rickgplus 1 1,105 09-23-2025, 09:33 AM
Last Post: _Aka_
  Morph game object along curve. mikechr2000 5 3,380 02-04-2025, 09:30 PM
Last Post: _Aka_
  Create Mesh Node, Make Static Options rickgplus 1 1,981 01-23-2025, 10:12 AM
Last Post: _Aka_
  Is it possible to make the face at the end of mesh? Chanon 3 2,640 11-14-2024, 04:38 PM
Last Post: _Aka_

Forum Jump: