I must be doing something wrong, but I’ve attached the “smoothFollow” script to my camera and targeted it at my rigid body vehicle. When I start the game, the camera moves to position, but as the vehicle moves the camera doesn’t. I thought the purpose of this script is to follow a rigid body? Am I missing something? If this script doesn’t do this, any hints on how to do this? The smoothLookat script worked, but this one doesn’t…
… figured it out. For some reason it didn’t want to follow the “object” but would follow the “mesh”. Don’t know if that’s how Unity is supposed to work or if it’s a problem related to Unity’s inability to import hierarchies from Blender. Either way, I’ve got it working…
It follows the transform position.
The transform position is like the pivot point of the object.
At the top of the main window there is this triangle, if you push it, Unity will show the handles at the transforms position instead of the center of the mesh.
This is what the script follows, most likely your pivot point in blender is a bit off.
You can always create a child transform in Unity place it properly, and then follow that instead.
Ok, got it. Thanks!!
Hey is this kind of parenting expensive at all? I was instantiating a torpedo with a particle emmitter and a light, and because the orientation was 90 degrees out on import, I parented it to an empty g.o., and then it would instantiate along the correct axis. However it tended to crash PC’s, and I was wondering if it was due to a bunch of data being created that was actually parented-so It was that litle bit more complicated?
AC
PS G4 Up and cranking-New videocard-runs well but sluggish on Doom3. Figure my cpu is slowing thigs down(733mhtz)
parenting objects is usually not expensive, as always one can overdo it with extremely deep hierarchie, but if you keep it sane it’s no performance problem.