What in gods name does this mean? Ive tried to get this off the consloe every way I can imagine. Does anyone have a clue what this could be? the only normals I can think of are to do with polygons and the face they are rendering. Help?!?! More precisely: !IsNormalized (normal) In the console: Assert in file: Plane.h at line: 56 and: Assert in file: Plane.h at line: 84 :!: :?: :evil:
Okay, Im trying to do 2 things with my submarine:1 Make it coast along, by itself. I have found I can do that either thru scripting, (Translate) and by using Constant Force(physics component.) But I also want to have it respond to first person controls, so it will go faster, slower and side to side. The instantiating of rigidbodies is crashing computers the world over too, but firstly its about this control system. If you check my atlantis post, youll see I actually did get the sub to behave how I wanted, and that was thru an elaborate mix of constant force, hinge joints parenting and when I booted Unity today, the sub now swings around in circles, although I haven changed anything. And no, I have no idea how I did it the first time, it just took a few days trying stuff.Maybe you could help me with this: Code (csharp): var forwardSpeed = 10; var backwardSpeed = 5; var strafeSpeed = 8; function Update() { transform.Translate(1, 0 * Time.deltaTime, 0); } function FixedUpdate () { // Step1: Get your input values horizontal = Input.GetAxis("Horizontal"); vertical = Input.GetAxis("Vertical"); // Step 2: Limit the movement on angles and then multiply those results // by their appropriate speed variables percentofpercent = Mathf.Abs(horizontal) + Mathf.Abs(vertical) - 1.0; if (percentofpercent > 0.1) { // if we're here, then we're not moving in a straight line // my math here might be kinda confusing and sloppy...so don't look! percentofpercent = percentofpercent * 10000; percentofpercent = Mathf.Sqrt(percentofpercent); percentofpercent = percentofpercent / 100; finalMultiplier = percentofpercent * .25; horizontal = horizontal - (horizontal * finalMultiplier); vertical = vertical - (vertical * finalMultiplier); } if (vertical > 0) { vertical = vertical * forwardSpeed; } if (vertical < 0) { vertical = vertical * backwardSpeed; } horizontal = horizontal * strafeSpeed; // Step 3: Derive a vector on which to travel, based on the combined // influence of BOTH axes tubeFinalVector = transform.TransformDirection (Vector3(horizontal,0,vertical)); // Step 4: Apply the final movement in world space rigidbody.velocity.z = tubeFinalVector.z; rigidbody.velocity.x = tubeFinalVector.x; } function Awake () { rigidbody.freezeRotation = true; } This is the FPS code with a function update(translate) inserted at the top. Is thee a reason the two dont work together? They also dont work together if I apply them as seperate scripts. Is there a way through parenting to achieve what I somehow did with the Atlantis control system? Thanks AC
If you have a rigidbody attaced to an object, you must not manipulate the transform component directly.
Hey Thanks Freya, It worked once I removed all the rigidbodies. So let me know if this is correct: Rigdbodies subject the gameObject to Physics, and Physics overides Transforms? Im still not sure what "!isNormalized" means though.(see above post) Cheers AC
Thats Freyr I'm not a girl... That's an internal assert statement inside Unity. It is harmless. I'm pretty sure it's a known bug, but just in case feel free to report it using the bug reporter app.
So you are a God then? I knew it! Freyr "bestows peace and pleasure on frustrated Unity users". ;-) -Jeremy