Physics: Linear - Cannot drive on.

Questions and answers about the how and why of making maps.
Post Reply
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Physics: Linear - Cannot drive on.

Post by PsYch0 »

Sorry for multiple posts, recently; but I figured I'd keep respective topics separate.

After much reading and testing, I finally got a physics driver to work that will move the tank at an accelerated velocity (linear). The problem is that I cannot drive ON to the object with the physics driver. I can jump onto it and drive off it at the end, but I cannot drive onto it at its beginning.

FYI about the map: I've created 5 physics drivers; (1) dummy driver with no properties other than a name; (4) linearly accelerated drivers (+/- x/y). There is a group with 3 meshboxes set up to appear in a line, but with small gaps between them (i.e ------- ---- --------). The group is instantiated four times for north, south, east, and west walls. The north wall moves east (linear 100 0 0); the east wall moves south (linear 0 -100 0); the south wall moves west (linear -100 0 0); and the west wall moves north (linear 0 100 0). I set the dummy physics driver for each wall segment in the group defintion; then in each instantiation, I reset the physics driver to the one for the desired velocity change.

Any clues as to why the tank cannot drive on to the speed tracks would help a lot.

EDIT
NOTE: This problem seems to be inconsistent. I'm never able to drive onto the north wall (track moving east), and when attempting I get stuck and must jump to get off. I can always drive straight onto the east wall (track moving south). I can never drive onto the south wall (track moving west), and to get "unstuck," I can simply "move backwards" which will force a jump; however, this trick occurs on no other wall. I can sometimes drive onto the west wall (track moving north) and sometimes cannot.

I'm hosting a demonstration map with just 4 bases, 4 walls, and a track on each wall (no textures), at bz.kicks-ass.org:5100

There also seems to be a problem with the southeast (purple) base - no movement above a certain height (try going up the steps that lead to the top level of the base... and try spawning at the base (purple team) )??
END EDIT

Thanks
PsYch0
Last edited by PsYch0 on Tue Mar 07, 2006 6:25 pm, edited 2 times in total.
JPT
Private First Class
Private First Class
Posts: 260
Joined: Tue Nov 29, 2005 1:21 pm
Location: Germany

Post by JPT »

Maybe, you set the _maxBumpHeight to low.
Try 2.
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

Hmm. Wasn't setting _maxBumpHeight...
I tried anyway... no luck. I even tried setting it to something ridiculous like 10... still no luck.
Last edited by PsYch0 on Tue Mar 07, 2006 6:04 pm, edited 1 time in total.
User avatar
sid6.7
Private First Class
Private First Class
Posts: 614
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

Post by sid6.7 »

i also ran into this problem..

i wanted something like loumans arrow jumpys

what he related to me is he's raised the floor up off the
standard floor then made a mesh thats even with that part
not the real floor below for the arrow and put the driver there

then you can drive onto it...

Code: Select all

------------- < MESH object with driver
--------------------------  < MESH object elevated floor
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx < original floor
OR

if you make the meshobject thin enough like .01
if you touch the object the driver will kick in...

my map is an example of this here:
http://hosted.rangfar.com/bzflagworld/f ... .php?t=483

i have 4 flat meshboxs on the floor if you just touch one
it shoots you 200 in a opposite direction

its not great but i can't design like louman... :)
Last edited by sid6.7 on Tue Mar 07, 2006 11:30 pm, edited 2 times in total.
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

I'll look into that... I'm using walls with a 7.5 height; so they're not on the floor, but I guess I could put another object on that that is thin and with the physics driver... I'll try it out...

Also, for now i'm just using meshboxes... any reason those are not as good as meshes... ??

Thanks.
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Interesting Find.

Post by PsYch0 »

So I decided to figure this out... and may or may not have, but I've certainly found something interesting.

I started rebuilding from scratch. First, I put up the four perimeter walls and gave them physics drivers accordingly - all worked well. Then I put bases in the corners and shortened the perimeter walls to connect to the bases rather than to run through them. Again all was working well.

I then added a floating base above the ground base; however, I made this base smaller than the ground base and moved it to the corner. In order to do this nicely, I used a group definition for the two structures together, placing the floating base in the southwest corner.

When instantiated, the group is perfect, then, for the southwest corner of the map, but must be rotated (via spin) 270-d for northwest, 180-d for northeast, and 90-d for southeast. When doing this, I noticed that I could no longer drive onto the south wall.

To demonstrate this, I replaced the odd, floating, corner base with an L sitting on the base and set up to worlds. The non-rotated, but completely driveable map is at bz.kicks-ass.org:5100; the rotated, but buggy map is at bz.kicks-ass.org:5101.

Each team spawns in the different corners (G=sw,R=nw,B=ne,P=se) and Rogues spawn on a corner at random. The physics drivers push you CLOCKWISE around the map. On the 5101 map The south wall is the one with the bug; therefore, coming from the Purple base (se corner) and traveling to the Green base (sw corner), you will not be able to drive onto the speed track - instead, you must jump.

In case you get confused as to what map you're in; the L shape will appear different as you approach each corner in the buggy map 5101. However, it will appear exactly the same as you approach each corner in the seemingly bug-free map 5100.

So, it seems that somehow spin affects physics drivers in a not so good way.
Perhaps some Development guys can figure this one out ?? :?

P.S. I've also attached BOTH map files; notice that the only difference is that in the 5100 map, the spin lines are commented out...

EDIT
A quick fix:
So, after thinking about the above for a second, I realized "If it's the rotating of the base that messes with the physics drivers, then how about not rotating the base." I didn't like this idea b/c I want a pretty complex base and it's nice to have a group that can be adjusted for each team. Then it hit me: the very bottom layer, the 50x50x7.5 base in each corner, can be taken OUT of the group and manually created 4 times, once for each corner. Then I can create a group with the rest (like the "L" shaped legs in the above example) and rotate that as needed.

This works. That is, the "L" is rotated in each corner, but since all the structures immediately connecting to the speed tracks (walls with physics drivers) were not moved, rotated, etc, all are completely driveable.

I put up yet another sample map at bz.kicks-ass.org:5102 and uploaded it's map file below.

YAY! :D
END EDIT
Attachments
5102_world_map.bzw
Lower bases separate from "L" group. The L group is rotated and NOT the bases in each corner, leaving their assocation with the speed tracks to operate as normal....
(2.34 KiB) Downloaded 290 times
5100_world_map.bzw
No rotation of bases, but completely driveable speed tracks.
(2.34 KiB) Downloaded 250 times
5101_world_map.bzw
Rotated bases for proper look; however, now one speed track cannot be driven onto.
(2.33 KiB) Downloaded 232 times
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

I think the original problem here is caused by the "conflict" with 2.0 objects and non-2.0 objects.

If you make a box and meshbox of the same height next to each other, you won't be able to drive over the seam from the normal box to the meshbox. You can drive the other way, however. The same goes for a flat mesh and the ground. It's just a weird issue in the game... it can be quite annoying sometimes. One solution would be to just cover the entire ground in mesh... but this screws up OO, PZ, and BU. :?
Optimism is just a milder alternative to denial.
User avatar
sid6.7
Private First Class
Private First Class
Posts: 614
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

Post by sid6.7 »

L4m3r wrote:I think the original problem here is caused by the "conflict" with 2.0 objects and non-2.0 objects.

If you make a box and meshbox of the same height next to each other, you won't be able to drive over the seam from the normal box to the meshbox. You can drive the other way, however. The same goes for a flat mesh and the ground. It's just a weird issue in the game... it can be quite annoying sometimes. One solution would be to just cover the entire ground in mesh... but this screws up OO, PZ, and BU. :?
yes like my goofy example above...reedited....

yes DONT use OO PZ..
User avatar
sid6.7
Private First Class
Private First Class
Posts: 614
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

Post by sid6.7 »

PsYch0 wrote:I'll look into that... I'm using walls with a 7.5 height; so they're not on the floor, but I guess I could put another object on that that is thin and with the physics driver... I'll try it out...

Also, for now i'm just using meshboxes... any reason those are not as good as meshes... ??

Thanks.
that should work....
Post Reply