[REQ] Wall/Ceiling climbing script example

Posted By: Nems

[REQ] Wall/Ceiling climbing script example - 12/31/07 19:34

Like many in the forums I am wanting a clear definitive example (working would be good) of the player character walking on walls and ceilings.

I see Frazzle and vlau are looking at various methods and many are talking about quaternions (whatever those are! )

I had assumed that this could be accomplished using 'normals' and local axis for pan/tilt calls but am unsure on how to approach in this direction or indeed, if this is actually possible.

Has anyone a n example to share please?
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 20:10

What you need to do is a trace down, then two more traces forward infront of the character and backward, and then set the player to the average between them.
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 20:21

Hey thanks for the hint lostclimate.
How much would you ask for to write a working example for me ?
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 20:53

15USD sound good?
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 21:04

Awesome, please pm me to arrange payment details (dont have credit card but can use mum in laws )or thru the banks maybe?
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 22:17

I've got an working script right here so no money needs to be spend Nems
It's not perfect yet but it will do if the restrictions are takin into account ^^

Cheers

Frazzle
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 22:31

Thanks Frazzle but its ok, its something that might prove usefull for another project I have in mind, cheers mate.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 12/31/07 23:33

Oke

Cheers

Frazzle
Posted By: vlau

Re: [REQ] Wall/Ceiling climbing script example - 01/01/08 10:09

Wall/Ceiling climbing: I see some tips about this topic
when I search the forum but no completed code. Will be great
if frazzle can post your code here. I think many people will
love you.

Camera tracking object without spin at 90 & 270
I found some members looking for a solution about this
issue and I've tried very hard to solve this problem,
still not success, have tried to use atan2(), still no luck.
Posted By: Wade_Adams

Re: [REQ] Wall/Ceiling climbing script example - 01/02/08 02:46

It would seem to me that a wall/ceiling climbing script would simply involve to parts:

standard movment script with pan tilt adjustment for the angle of the wall/floor/ceiling and an adjustment the gravity vector based on the angle of the entity.
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 01/02/08 04:55

there are a couple of issues with that wade, one of the big ones is, if your level is low poly the camera will jump between angles.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/02/08 20:03

The jumping between angles is indeed a pain in the a*s due to GL off course but I think I'll post a small level with what I've got. The rotation works perfect but the jumping of angles is like mentioned a hard thing to get right. It seems after using ang_rotate for arbitrary rotation and switching to the native angles (pan, tilt and roll) again, that the angles shift. Thus defining angles after using ang_rotate is the only option AFAIK atm.
Anyway, I'll probably post it tommorrow so you guys can play around with it as well

Cheers

Frazzle
Posted By: Wade_Adams

Re: [REQ] Wall/Ceiling climbing script example - 01/03/08 05:03

Personally I don't think the camera would be the issue-- it would be the character itself "twitching" between angles unless the level is designed very carefully, but that will be an issue with complex level with wall climbing like that especially a cave with lots of irregularities. maybe and invisible "hull" to smooth it out.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/03/08 09:40

I promised that I post a little level which shows the wall/ceiling abilities.
Basically it works perfect but only in one direction so you only can check the correct normal while following this order:
floor->wall->ceiling->wall->floor so it's a one way street only atm ^^
Rotation on the floor, wall and ceiling can be executed but afterwards when switching from normal, this must be done in the order I described above. Here's the link
Controls:
-wasd;
ws: forward/backward movement
ad: pan left/right
-double tap '0' will activate the camera;
arrow keys: movement
pageup/pagedown: looking up/down ^^

Play around with it and give my your C&C afterwards so we can make this perfect together

Cheers

Frazzle
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 01/03/08 21:21

Awesome Frazzle, hopefully this would help a lot who are looking for this function and maybe a good overall working m0del can be found to just plug into
Posted By: Nomad

Re: [REQ] Wall/Ceiling climbing script example - 01/03/08 23:12

Awesome, had a good play but its beyond me.
If I was to use it, what could I use it for?
Posted By: Ilidrake

Re: [REQ] Wall/Ceiling climbing script example - 01/04/08 18:49

a spider-man or ninja/thief type game is where this kinda stuff comes in play well. Good work Frazzle. I'll take a peak at it and get back.
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 01/04/08 19:08

well Im still working on the version for nems, hopefully it will have non of the restrictions that the current version has.
Posted By: Ilidrake

Re: [REQ] Wall/Ceiling climbing script example - 01/04/08 20:31

Good for you.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/04/08 20:37

@ lostclimate:

I hope you succeed in making a better one since the restrictions my version has can be quite annoying indeed
But I created it for a certain purpose and it is sufficient enough for the attemped goal atm

@ Ilidrake:

Thanks for the kind words and have fun playing around with it

Cheers

Frazzle
Posted By: DavidLancaster

Re: [REQ] Wall/Ceiling climbing script example - 01/06/08 12:37

Like Super Mario Galaxy? That'd be really tough to do. Wouldn't be hard to do a spider man code as the character model wouldn't be tilted to extremes so you wouldn't get the angle changing spinning issue.

I still wonder if it's possible to get it functioning like Galaxy Good work Frazzle!
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/06/08 16:57

Thank you David, I really appriciate credits from a user like you
Btw, there's only one way to find out to see if it's possible to fit Galaxy

Cheers

Frazzle
Posted By: Grafton

Re: [REQ] Wall/Ceiling climbing script example - 01/06/08 20:49

Quote:

I had assumed that this could be accomplished using 'normals' and local axis for pan/tilt calls but am unsure on how to approach in this direction or indeed, if this is actually possible.

Has anyone a n example to share please?




My example is two years old so it does not use quaternions or c-lite. It works
on curved surfaces at any angle in every position. I do think quaternions are a
more elequent solution and perhaps the best way to do this however.

Frazzle seems to just about have it figured out (Good Work!), although his
solution is different than mine.

Currently I am working on and off on a racing game that uses what I call
"gravity leveling" technology. The tracks twist 360 degrees, double back on
theirselves upside down and loop also.
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 01/07/08 09:15

Hi Grafton, I remember this demo and this actually lead me to look into the function as you had already proved it possible back then.

Any chance of looking into the script?
Posted By: Ready

Re: [REQ] Wall/Ceiling climbing script example - 01/07/08 09:37

I second that.
Such a script would surely be helpful
Posted By: Grafton

Re: [REQ] Wall/Ceiling climbing script example - 01/07/08 09:59

Since the solutions presented here are different than mine was, I cant really comment on them, although they seem very workable to me.

My "gravity leveler" code is the heart of my current game concept (sort of a "wipeout" inspired racing game). It will be pretty much finished once I can finally fix the collision problems with the vehicles sometimes "clumping" together and becoming stuck. At that point if it is still needed (or if I lose interest), I wouldnt mind posting my solution here also.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/07/08 19:42

Posting your methode would be nice
It would be useful since we can compare our pov about our approach thus maybe solve each others problems

Thanks in progress

Frazzle
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 01/07/08 20:20

You can set ID's for each vehicle and check if they intersect then draw them apart or similar to get past the 'clumping'.
Alternatly, you can get them to keep reletive distance with a vec_dist function so that they never clump together or rarely clump together (I've had issues with vec_dist in this regard).
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/09/08 08:10

"Camera tracking object without spin at 90 & 270"

- I've heard problems about this several times. If it's still needed, I think I can program a solution...
Posted By: vlau

Re: [REQ] Wall/Ceiling climbing script example - 01/09/08 09:24

@xXxGuitar511,

Actually I don't need it in my project, but there are
some forum members here looking for a solution about
this issue, it would be nice if you can program a
solution FOC.

I've tried different approach without success, I can make
the camera tracking objects without spin at 90 & 270 if
the object is flying staightly overhead, but the problem
is my code can't apply to other objects that are flying
in different directions.

What I'm suppose to do is the camera is on the world center,
number of objects are flying around the world, you're free
to click on any object and the camera will turn to looking
at the object and start tracking it all the way.
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/09/08 09:32

If you've seen the "arbitrary turret" thread, then I plan on using the same concept. Rotate the offset of the target, than ang_rotate() to face it... We'll see
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/09/08 19:01

About that thread, I've talked about it with Fenriswolf and it basically not works when he moved the turret. It only worked if he predefined the angles
Thus, I think you might need to change to concept abit like I did on my version but as you probably know, it has some restrictions ^^

Cheers

Frazzle
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 17:26

Works fine with my version. I have a turret (one model using bones) that I can move or rotate at any angle, and it will slowly rotate to face the target.
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 19:17

Could you post a little demo of that
Btw, does it still work after shifting the normals ??

Thanks in progress

Frazzle
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 19:49

I was actually just going to tune it up a bit and start a "xXxContributions" thread, including a "terrible" turret model I made for it

...Shifting normals? What exactly do you mean?
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 20:23

Quote:

I was actually just going to tune it up a bit and start a "xXxContributions" thread, including a "terrible" turret model I made for it





Well, then I'll be waiting I guess

Quote:


...Shifting normals? What exactly do you mean?





I mean shifting from normal when going from a floor up to wall up to a ceiling and visa versa. The normal will change during that process like the little compiled version I posted
Hope that helps.

Cheers

Frazzle
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 21:16

Ok. Yes, it works with any angle, even changing. You could place it on the back of an airplane if you wanted

I added the feature of rotating to face the target instead of always facing. Now I'm addind a system that uses trigger_range to detect threats and then shoot. It's already working, I just want to cleen it up a bit
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/10/08 21:37

Oke, I'll be waiting for your little 'demo' to test it out then

Cheers

Frazzle
Posted By: Fenriswolf

Re: [REQ] Wall/Ceiling climbing script example - 01/12/08 02:20

Yeah, xXxGuitar is right; with bones it works without any problems.

I am using the code for the rotatable turrets of some space battleships.
The turrets are rotated by two bones, whereby one bone handles pan rotation and the other tilt rotation.

However, as frazzle said, this rotation stuff doesnt work properly when the models pan and tilt angles are altered directly.

Well, I'm not much of a mathematician, so I dont know whats going on there. ;-)
Posted By: xXxGuitar511

Re: [REQ] Wall/Ceiling climbing script example - 01/12/08 02:38

As soon asthis level finishes compiling, I'll try and get my code finished up and get that thread started...

After this turret, I'm going to post some code for walking around on a circular level (planet), including physics. Nothing special, but it's fun to figure out
Posted By: frazzle

Re: [REQ] Wall/Ceiling climbing script example - 01/12/08 15:57

Sounds promising Guitar, I'll be waiting

Cheers

Frazzle
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 01/16/08 00:54

@4eyes:

I am extremely sorry, but I am booked for a very long time with other projects, and tried to take on way to much work by bringing this on too. Again, I didn't mean to string you along and it was rude of me to do so.
Posted By: Nems

Re: [REQ] Wall/Ceiling climbing script example - 01/16/08 02:41

Thanks mate, dont worry about it. I understand totally but thanks for the consideration, much appreciated.

Hope you continue to find good work here after you have caught up again.
Cheers...
Posted By: lostclimate

Re: [REQ] Wall/Ceiling climbing script example - 01/16/08 04:06

lol, I went from not ever being able to find work, to finding more than I can handle. not a good dilema... but not a bad one either....
© 2024 lite-C Forums