cassius Posted February 28, 2014 Posted February 28, 2014 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? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
YouGroove Posted February 28, 2014 Posted February 28, 2014 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. Quote Stop toying and make games
tjheldna Posted February 28, 2014 Posted February 28, 2014 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. Quote
gamecreator Posted February 28, 2014 Posted February 28, 2014 http://www.leadwerks.com/werkspace/topic/6488-le2problem-with-falling-character/ Quote
MexSource Posted March 3, 2014 Posted March 3, 2014 When the player falls he gets faster right? Then why not check the y-movement (if it's too high, let him die) Quote C++ :3
cassius Posted March 3, 2014 Author Posted March 3, 2014 Thanks for replies. I will try the timer first then the y see. See which works best. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
cassius Posted March 28, 2014 Author Posted March 28, 2014 What command do I need to check speed of collision? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Einlander Posted March 28, 2014 Posted March 28, 2014 The lua fps controller dies when it falls from a height. Its set to check on impact the players speed and if its higher than a threshold, kill them. Quote
cassius Posted March 28, 2014 Author Posted March 28, 2014 Rhanks. I don't use lua but I can take a look at that script. EDIT: When I get 3.1 Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Recommended Posts
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.