Game Development Community

TGE 1.4 Editing bug

by Gareth Fouche · in Torque Game Engine · 12/14/2005 (12:00 am) · 18 replies

I'm getting a wierd quirk with world editing in 1.4 ( I have made no modifications to it yet). I'll place a model in the creator mode, then rotate/transform it a bit, leave world editor mode, then go back in (to editor mode), and the model will have moved/scaled back to where it was when I initially plonked it down.

It only happens sometimes, not sure but it seems to happen when I don't relight the scene when I make changes, before flipping out of edit mode. Will check to confirm that this is the case tonight, but wondering if anyone else has experienced anything like this?

#1
12/20/2005 (9:37 pm)
Tested and I get the same behavior, create new object, transform it about a bit, F11, F11 and it returns to initial creation point.
#2
12/20/2005 (9:44 pm)
Hum.. that's like what happens to my water when I rotate the angle sometimes it get's reset to flat by the editor as if it detected something wrong with the coords (rotated for waterfalls).
#3
12/20/2005 (10:11 pm)
After you place the object, unselect and then reselect it and click apply. This should apply the changes and prevent this problem from occuring. It's not a fix exactly, but it does work as a temporary solution until someone figures out what the real problem is.
#4
12/20/2005 (10:21 pm)
I take it you are saving the mission when you leave the world editor?
#5
12/20/2005 (11:03 pm)
Just checked and this fault still exists in the latest head.

Do the following to reproduce this fault:

using tutorial.base.
start torque.
start world editor.
enter world editor creator.
create TorqueLogoItem.
move object with the z axis rod.
toggle F11 (out of, then back into the editor), notice no change.

move the object by its "bounding box" (not using axis rods)
toggle F11 and the object now jumps back to last location.

now when you move by the axis rods you get the error.

Midhirs solution above will fix the object at the new location but the error remains for subsequent moves, however creation of a new object clears the fault for axis rod movement.
#6
12/21/2005 (4:14 am)
Yeah, I've had this problem too. I ended up deselecting and selecting again to get it to stick. It was a bit annoying though. A fix would be good.
#7
12/21/2005 (4:49 pm)
Glad to see I'm not the only one getting this!

This is like a bug that was in the editor in the previous version: After copying and pasting an object, the pasted object would appear to be selected in the 3D view, but the values displayed in the bar on the right would affect the original object. So you'd type in changes to the values and see the original, unselected object receive those changes. Really annoying, and the only "fix" was to select another object and then select the duplicate.

This new bug is similar, but worse.
#8
12/21/2005 (5:37 pm)
Well the problem is I believe that if you move it sometimes it doesn't get updated on the inspector pane and then it reverts to what was on the pane. I'll check for a solution.
#9
12/26/2005 (1:53 am)
I have the same problem.
And this is another problem I think it relate to this problem.

I create a tutorial collision box (1) in racing mission.
the scale is 1 1 1. The collision between the vehicle and the Box is ok.
Then I scale 1 dimension (1 0.1 1 for example (2) ) The vehicle go through the Box.
At first, I think the collision problem. But today I find out the answer.
I create the tutorial collision box (3) and its original size(scale 1 1 1) is the same with the scaled box (2).
Then the collision is ok too.
So the bug is:
If the object is scale, its collision is not ok.
Enable render collision info in renderImage in Vehicle.cc, I found:
( the collision convex of vehicle has an acute angle in its head
(this is vehicle) <=> |_| (this is box)
case 1: when the vehicle go to the box, one collision point occurs. ( collision ok)
case 2: when the vehicle go to the box, 6 collision point occurs ( there's no case for 1 point, 6 or 0)
So I think there's a problem with Scale or with editor??? But I am not sure.
case 3: the same with case 1. (collision OK)
#10
12/28/2005 (8:58 am)
I have this problem too!!
#11
01/21/2006 (9:12 pm)
I also have this problem.
#12
01/21/2006 (9:16 pm)
I also have this problem.
#13
01/22/2006 (2:09 pm)
Here is a temporary hack that automates what you guys said manually solves the problem. I looked around the source for a little bit to find the cause, but just ran out of time. Here's a fix, if you'd call it that.


In ./engine/editor/worldEditor.cc around line 1909(if you have TLK) insert the code between the //smdBegin and //smdEnd

if (mHitInfo.obj)
      mHitInfo.obj->inspectPostApply();
   mHitInfo.obj = 0;

   //smdBegin
   if (mHitObject)
   {
	   Con::executef(this, 3, "onClick", avar("%d", mHitObject->getId()));
   }
   //smdEnd

   //
   if(collideAxisGizmo(event))
      setCursor(HandCursor);
   else
   {...

The addition just calls the WorldEditor::onClick function from your ./example/creator/editor/EditorGui.cs file when you release the left button, which will update the EditorGui.

Again, let me repeat, this really doesn't solve the root problem, but it does work. I tested it by moving, scaling, and rotating added objects by their bounds box and axis handles. I did have occasional crashes, but I had those before the code addition.

B--
#14
01/22/2006 (9:42 pm)
@ Brandon

Would this bug also affect using the Axis handles that let you move your water block around. Everytime I get my water right in the levels I can never reselect it. Once I got it placed I saved my Mission I relog and cant touch that waterblock again. Even clicking on it in the editor tree. Its bad annoying but it makes me have to place my waterblocks last and then cant tweak them afterwards.

Anyway I been making more levels with rivers and streams this started happening. I will put in your fix code see if anything changes


Edit: Ok dont really know now if its related or not or just something weird but now my terraform brushes are gone completely (<-I didnt put code fix in yet, )I just went in to check out a mis file I was working on anyway I just wipe everything clean and unzip a fresh 1.4 and will just build again.
#15
01/25/2006 (2:02 am)
Johnny I believe there is no axis gizmo for the waterblocks anymore, you can manipulate their sizes and positions with their size/position values in the inspector pane.

Just saw your fix, Brandon, I'm trying it now. *edit* Fantastic, it works like a charm, thank you!
#16
01/25/2006 (6:48 am)
@Johnny: I'm quite busy right now, but if I get a chance to look at it, I may be able to add the axis gizmos back to the water block. It may be something very simple. If it is, I'll post the fix for ya.

@Midhir: Good to hear it worked for you! It's amazing what two lines of code can accomplish.

B--
#17
03/02/2006 (8:53 am)
Hi Everyone,
Someone has posted somewhere the fix for the axis gizmo for waterblocks, but for the life of me I can't seem to google the original thread, but here is what I changed in regards to that forum, in waterblock.cc I just commented out:

// if(!mRemoveWetEdges)
// {
// setGlobalBounds();
// }


around line 399.
I don't know what else it breaks, but I haven't had any problems after doing it and I can reposition the waterblocks with the mouse. Some people like not being able to drag the waterblocks, but repositioning it with the XYZ numbers makes me crazy! Hope this helps.

- Alan
Really Really Good Things Studio
#18
08/03/2006 (7:04 pm)
Has anyone come up with a real fix for this? I'm starting to use the mission editor pretty heavily, and this bug is driving me insane.

Basically, if you move or rotate an object with the transform handles, its transforms don't get sent to the inspector pane. This leads to the problem you get when you exit out of the editor, where the object pops back to its previous position.

There is the option of hitting "apply" to lock in the values as someone suggests, but hitting apply makes the name field active - I go to move around (using the wasd keys) and I end up making various combinations of w, a, s, and d, the object's name :/

I usually just click the object a second time after moving it to get the inspector pane to update.

Also, there's the problem with the copy/paste: after pasting a copy of object A, I frequently go into object copy B's inspection pane and start typing in new scale values. Nothing seems to happen, though. Then I realize, the inspection pane is still showing object A's values even though object B appears to be selected on-screen, so I'm actually changing the values of object A (which is frequently offscreen after I've pasted, so I don't see it changing), without realizing it.

Clicking object B a second time doesn't always work to update the inspector pane after copy/pasting. Sometimes you have to click a whole other object and then back again to get it to update.

I see Brandon's fix above, but he describes it as a hack. Is there a better fix out there?