Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Better and double Jump.

just_in_case
Moderator
Quote
2018-07-20 16:11:20

So many peoples here on the forums had requested this and its true that coppercube inbuilt jump feature is not game-worthy, you have to tweak it many times to make it work.....

So, I have created a better jump script which allows you to jump smoothly while moving/walking. and also allows you to do a double jump.

but there is a limitation, script will work only on targets which have physics simulation enabled for example Windows(exe) and MacOS(App).

You have to change physics engine from collision to Physics simulation in target publishing settings.


if you wanted to tweak the script just tweak the "gravity" value in the root scene node and var "jumpht" value in the script to change the jump duration and height.


here you can see the script in action and can also download the CCB file from the video description link:https://www.youtube.com/watch?v=...





xanimalkingx
Registered User
Quote
2018-07-20 18:57:57

Will this work for FPS camera and allow strafe instead of turning player?


just_in_case
Moderator
Quote
2018-07-20 19:51:39

Yes it will allow... You to strafe and will also work for fps camera... Here is the link to ccb file with the script for fps camera...
https://drive.google.com/file/d/...


xanimalkingx
Registered User
Quote
2018-07-21 00:30:08

The issue is, the jump only resets at y position 0. This means, if an object has geometry that's at y position 24 (for example), the jump wont reset and the player cant jump unti he/she moves to y position 0


just_in_case
Moderator
Quote
2018-07-21 00:35:49

Hmmm.... I didn't tested that... Well let me see if i can overcome that problem...


xanimalkingx
Registered User
Quote
2018-07-21 01:41:19

I don't think it's entirely possible as you have to listen for collision. You got the entire jump part right but the jump has to be reset once you hit an object.


xanimalkingx
Registered User
Quote
2018-07-21 08:56:53

Here is my work on converting this into a CopperCube Behavior Extension,
Place it at `C:\Users\<UserName>\Documents\CopperCube\extensions`
However, it still has the issue mentioned before.
http://www.mediafire.com/file/ng69j45r227z7ub/behavior_doubleJump.js/file


just_in_case
Moderator
Quote
2018-07-21 12:31:46

here is the link to the ccb file which currently uses my script and fake collision detection behavior by @Jaimezegpi.... it works but it is still not ideal as you have to set diffrent radio for diffrent sized objects...

but it works a lil bit...
https://drive.google.com/file/d/...


xanimalkingx
Registered User
Quote
2018-07-21 20:25:05

wrote:
here is the link to the ccb file which currently uses my script and fake collision detection behavior by @Jaimezegpi.... it works but it is still not ideal as you have to set diffrent radio for diffrent sized objects...

but it works a lil bit...
https://drive.google.com/file/d/...

It's really buggy. I tested the example CCB and I could quadruple jump by falling off a cube then jumping four times while moving forward and backwards towards the cube


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact