Jump to content

Recommended Posts

Posted

I have asked this question before but can't remember what replies I got

I want my main character to die if it falls or jumps from a great height, but not for a short distance.

Apart from knowing the character will be airborne I can't think of anything else to test it.

Anyone know how to handle this?

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

Raycast from chr position to ground to know the distance of fall.

With Point A = char position , and point B = Raycast floor hit

You just apply the distance math formula.

Stop toying and make games

Posted

The way I did it quickly is to use a timer when you jump after a certain time while airborne you are falling, which surprisingly worked quite well.

 

Thinking about it if you saved the value of your previous y every step and compared it to your current y value while jumping. If it's less then the previous you are falling, maybe that's an idea or a place to start.

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Posted

Thanks for replies. I will try the timer first then the y see. See which works best.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

  • 4 weeks later...
Posted

Rhanks. I don't use lua but I can take a look at that script.

EDIT: When I get 3.1

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...