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
#5
Actually the GO setup is implementing a state machine through object activation/deactivation and is instantiated from game data. It does its job but has its flaws.

Enemy (higher level scripts): this root object never moves
- EnemyPrefab (Only MeshRenderer and colliders): the object to move
- ExitSpawnMovement (instantiated from a prefab with preconfigured Move controller script and a movement script): position of this object places (for example) a spline at the correct location
- ApproachMovement (idem)
- AttackMovement (idem)

Only one ***Movement object is active at a time.

I would have used the SplineController in place of our own move controller and put the spline on the same object... which is a bad idea right now and why I would have loved to be able to choose which object is moved by the controller. I'll certainly rewrite a controller for my special case but thought about the suggestion above which *might* have worked off the shelf.
Reply


Messages In This Thread
RE: How to make controller affect another object than the one controller is attached to - by Aberdyne - 01-13-2016, 01:05 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: