Bounce off solid function?

Discussion and feedback on Construct 2

Post » Fri Jan 23, 2015 1:06 am

Hey everyone,

I have been reading through every code file I can in construct 2 and I found in preview.js a BounceOffSolid function. Nothing references it in any file I have looked through. Did there used to be a behavior or custom movement option that used this?
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,163

Post » Fri Jan 23, 2015 2:02 am

I think it's probably part of the bullet behavior.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Post » Fri Jan 23, 2015 2:09 am

@Colludium - Right you are! I tend to do everything without behaviors, but this function is good to know about. I wish custom movement used it (behavior idea)

I have been trying to find the best way to calculate surface normals on collision and these function peaked my interest. It knows surface normals... in a way... consequently it also can be used to create a platformer that uses elasticity and friction without using physics :D
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,163

Post » Fri Jan 23, 2015 3:20 am

If you could obtain collision polygon slope gradient then that would be very useful....
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Post » Fri Jan 23, 2015 11:21 pm

@Colludium - That is what I'm looking for. I had a post about finding surface angle (normal) a while back. Ashley asked why I needed it but then never got back. I am pretty sure the system could tell you this info, I know physics can tell you this as well, and I can create it myself by mucking about with object sensors and different object types with a known slope on one side.

I just prefer elegance though. and any system I make requres alot of placing of objects in the editor.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,163


Return to Construct 2 General

Who is online

Users browsing this forum: TheRealDannyyy and 9 guests