When colliding with a 3d object. would it be possible to get the material name of the triangle you collided with? would be useful for effects or sounds (foot steps on rock vs snow, ect)
Question: It seems like every raycast or shapecast happens twice or triggers "on raycast result" twice. Is that intentional? For instance, in the Rapier Raycast triggers example, two projectiles are spawned with every click instead of one. If that's on purpose, is there a simple way to ignore one of the raycast result triggers with each click?
It's only implemented for 3d shape, 3d object and sprite. For now just put a sprite or 3d shape of the same size where you want the physics object to be.
hello. where to see examples of using physics with a character? is there any documentation on the physics plugin? it is absolutely not clear how it is organized here.
the Raycast results always seem to return HitFaceIndex: 0 regardless of which side of the 3Dshape has been hit. Is this a bug or am I missing something?
Moved translate to every tick (to enable gravity, -10 to z). Change down to set x value. Add ground for character to move on. Also changed project to regular z instead of normalized z. Do not use normalized z for 3d project. Also sort based on camera distance for 3d layer (for 3d project).
it worked, but only when i put the ground with dynamic physic and turn on immovable, that wasn't clear lol, so the physic only work when you put one object with dynamics? put this in the description please , i was totaly lost until know this lol.
You don't need the ground, but for me it feels better to me to have a ground and some fake gravity for a kinematic character controller. You can delete the ground in my example and the 'D' movement still works (but it will be falling due to the fake gravity.)
I'm curious, I'm probably doing something wrong :P But I was just playing around and I couldn't seem to figure out how to make the dice react like dice, it sorta distorts when it rolls or moves around in any way.
If I pledge a considerable amount of money, can you implement the following: 3D collider from 2D collision polygon (mesh), extruded on Z-Axis by a given z-height?
If heightfeild does not work, can you show some screencaps about what you are looking for? (Sadly the cannon-es trimesh shape is not fully implemented it doesn't collide with the majority of other shapes.)
Can you provide a sample project with this geometry, so I can look in more detail and get a feeling for the scope (and how to do it, since the physics trimesh doesn't work.)
Hey Mikal! So far I’m absolutely loving this addon. I’m trying to build a super simple first person 3D platformer template and I’m using the Set velocity action for moving the player around on the X/Y plane but I don’t want to set the Z velocity with this action. (My plan is to use Z impulses for jumping later).
Can you please add expressions for the Canon3DPhysics behaviour that just return the object’s current X/Y/Z velocity? Because then I could just set the Z velocity in this action to Self.Canon3DPhysics.VelocityZ to leave it as it is.
Or alternatively three different actions to set the only the X, only the Y or only the Z velocity separately would also work perfectly.
Wow... will definitely buy and play with it this week. I feel like I have to remake my game now since all my characters are blob monsters and this will work so well........ so much work lol.
I guess this is a good alternative to heightmaps for slopes?
cool ! thinking of replacing all my enemies with this now. will this use deltatime by default in the future?right now even adding *dt to impulse give different speed at 60hz and 144hz
I mean locking angle features(toggle) of 3d shape with 3d physics behavior enabled. I was trying to make custom physics control to the 3d shape and I added if key down -> apply impulse. But it seems that when this 3d shape collide with immovable 3d physics surface its angle also changes.
3D Object will be able to rotate on all axis, figuring out collision options for 3DObject: manual sized sphere, box, automatically sized sphere box (based on initial bounding box, I don't think dynamically updated)
Your are genious man! I am very thankful that you have your attention on 3d physics too. I am really excited to see more updates on future. You are doing great man.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
When colliding with a 3d object. would it be possible to get the material name of the triangle you collided with? would be useful for effects or sounds (foot steps on rock vs snow, ect)
This is not available in physics, so instead I suggest creating 'dummy' objects that you can use as sensors. Make them mostly transparent, etc.
Great plugin so far!!
Question: It seems like every raycast or shapecast happens twice or triggers "on raycast result" twice. Is that intentional? For instance, in the Rapier Raycast triggers example, two projectiles are spawned with every click instead of one. If that's on purpose, is there a simple way to ignore one of the raycast result triggers with each click?
Thanks, will take a look.
Thanks for the report, try this:
https://kindeyegames.itch.io/construct-3-cannon/devlog/825336/fix-castraycastsha...
Thanks, that solved it!
Hello. In the RapierKinematicCharacter example the jump does not work
Ok, might be due to a change in raycast. Will check.
https://kindeyegames.itch.io/construct-3-cannon/devlog/825357/update-rapier-char...
I want to thanks to kindeyegames for making such a great plugin for Construct 3. That helped me build a useful 3D building Editor for construct 3 for making FPS Games
https://azeemdesigner.itch.io/3d-buildings-and-level-editor-for-construct-3
it would help me alot if you can recommend this tool.
thanks
Amazing! I will make a post about it.
Thanks so much
[Rapier] Hi, is there a way to set object's restitution (bounciness), for example, to simulate balls bouncing off the ground.
Not yet, but I will add that later today.
https://kindeyegames.itch.io/construct-3-cannon/devlog/817351/feat-body-add-set-...
Why does the collider not work for Tiledbackground?
It's only implemented for 3d shape, 3d object and sprite. For now just put a sprite or 3d shape of the same size where you want the physics object to be.
Hello, im loving the plugin, really a good job.
But my Rapier3D options is missing some options, like Collider Type
and inside "Shape" theres no ModelMesh option.
Image 1
Image 2
How can i fix that? (I tested on Opera and Brave browsers, all same thing )
Thank you
Try updating to the latest version
That Fixed It! Thank you so much
Applying force behaving unexpectedly on new versions. I applied 10 force on my object and it keeps on going even I have release the keys.
Force in physics is something continuously applied. An example of a force is gravity or a rocket thruster continuously on.
If you want to stop the force you must set it to 0.
If you want a brief 'push' use an impulse instead.
Thanks !
but when I Apply impulse it start to rotate alot
impulse 1,0,0 to relative 0,0,0
Apply some rotational damping. Is 0,0,0 the center of your object? Or is it not 'balanced'?
Send an example project and I can test.
Sure
https://drive.google.com/file/d/1OTRXqcqErSdYhz7SkbB9jV5HqTB3iWPY/view?usp=shari...
hello. where to see examples of using physics with a character? is there any documentation on the physics plugin? it is absolutely not clear how it is organized here.
For character see the project example: RapierKinematicCharacter.c3p
For more implementations, look at other 'Rapier' project examples.
For general concepts, this addon is a small subset of the Rapier physics js library functionality.
For more information and general concepts of the Rapier library, see:
Hi,
the Raycast results always seem to return HitFaceIndex: 0 regardless of which side of the 3Dshape has been hit. Is this a bug or am I missing something?
This plugin is ace, please keep up the good work!
Cheers!
Ah, sorry the face id is not implemented. it was available in cannon, but I need to explore rapier for it.
RapierKinematicCharacter.c3p
RapierSimple-1.c3p
These 2 don't work for me. Black screen with this error for both. Using 2.11.0.
Thanks for the bug report and the screenshot, they helped me debug the issue.
Fixed:
https://kindeyegames.itch.io/construct-3-cannon/devlog/744425/fix-updaterender-f...
Love your work ! , ... RapierJointsNoLight says its not a valid c3p file ...
Hmm, are you using the latest version of the addon?
Yes
Try RapierJointsMinimal, pulled out some unused code.
that works ! thanks ! be blessed !
tho the physics body offsets with the 3D object sometimes
the translate character controller don't move, did i something wrong?
Nothing obvious in this snippet. Test the sample projects, check if you are using latest version. If you cannot find an error, share the project.
the samples projects work, but in my project don't work, the box don't move, i'm using construct 3 v385 beta, here the project file: https://drive.google.com/file/d/18-Gp63WhD-ycurQb8viBRaSq6tAD5_wA/view?usp=shari...
Try this:
https://sendgb.com/ydtu1l6ebiZ
Moved translate to every tick (to enable gravity, -10 to z). Change down to set x value. Add ground for character to move on. Also changed project to regular z instead of normalized z. Do not use normalized z for 3d project. Also sort based on camera distance for 3d layer (for 3d project).
it worked, but only when i put the ground with dynamic physic and turn on immovable, that wasn't clear lol, so the physic only work when you put one object with dynamics? put this in the description please , i was totaly lost until know this lol.
You don't need the ground, but for me it feels better to me to have a ground and some fake gravity for a kinematic character controller. You can delete the ground in my example and the 'D' movement still works (but it will be falling due to the fake gravity.)
For some more info about character controllers in general see: https://rapier.rs/docs/user_guides/javascript/character_controller
(This is the physics library embedded in this addon, a subset of the many features are exposed to C3 right now.)
theres is a way to change the directions of player relative to camera?
You can try setting the x,y,z translation to the camera view direction (see camera3d view direction), experiment with that.
I'm curious, I'm probably doing something wrong :P But I was just playing around and I couldn't seem to figure out how to make the dice react like dice, it sorta distorts when it rolls or moves around in any way.
Just curious what I'm doing wrong :P
My guess is you are using normalized Z instead of regular z in project settings (should always use regular z when doing 3d)
Thank you! That worked :) I had no idea that setting existed :P
this is real power plugin! it can help me creat a real world
greetings On the page with SSO effect, when the opacity of the object decreases, it becomes black
If I pledge a considerable amount of money, can you implement the following: 3D collider from 2D collision polygon (mesh), extruded on Z-Axis by a given z-height?
Do you really need the x,y grid to be variable? Otherwise, you can use the heightfield shape that was just added to sprite mesh - check it out.
https://kindeyegames.itch.io/construct-3-cannon/devlog/635793/add-heightfield-sh...
If heightfeild does not work, can you show some screencaps about what you are looking for? (Sadly the cannon-es trimesh shape is not fully implemented it doesn't collide with the majority of other shapes.)
I construct an extruded 3d object at runtime from a mesh-distorted tiled background (creating mesh-distorted tiled backgrounds per outer edge)
I need the sewn-together 3d frankenstein object to check against collisions and raycasts.
Can you provide a sample project with this geometry, so I can look in more detail and get a feeling for the scope (and how to do it, since the physics trimesh doesn't work.)
https://drive.google.com/file/d/1J1ERc4qsMEnviZXoH06LS_4_NvRxGHE_/view?usp=drive...
Dang - I don't have some of those addons. Can you make a project where they are bundled?
Try out the sprite trimesh support!
This will work! :D
Thank you so much!
is the ssao-1-5-1 addon the same as Mikal_SSAO_Color? some examples are telling me I need it. but I can't find it
Ah, they are different, if you have 3DObject, it is available there.
If you let me know which example(s) has it, I'll check and swap it out for the 1-5-1 version.
PhysicsAndRotate
spring and Raycast_Triggers can't open saying that it's not a valid c3c file
Added SSAO-1-6-0.c3addon, please try that (and latest physics addon and c3 beta) - for Raycast Triggers
Hey Mikal! So far I’m absolutely loving this addon. I’m trying to build a super simple first person 3D platformer template and I’m using the Set velocity action for moving the player around on the X/Y plane but I don’t want to set the Z velocity with this action. (My plan is to use Z impulses for jumping later).
Can you please add expressions for the Canon3DPhysics behaviour that just return the object’s current X/Y/Z velocity? Because then I could just set the Z velocity in this action to Self.Canon3DPhysics.VelocityZ to leave it as it is.
Or alternatively three different actions to set the only the X, only the Y or only the Z velocity separately would also work perfectly.
Thanks a bunch!
I'll add it to the list.
Awesome, thanks!
cool
Wow... will definitely buy and play with it this week. I feel like I have to remake my game now since all my characters are blob monsters and this will work so well........ so much work lol.
I guess this is a good alternative to heightmaps for slopes?
cool ! thinking of replacing all my enemies with this now. will this use deltatime by default in the future?right now even adding *dt to impulse give different speed at 60hz and 144hz
Yes, definitely will have that option in the future.
A suggestion: Can you add Apply Force features too and a tick option to prevent or not prevent rotation of 3d Shape?
I will add to the list, also support to control rotation
In terms of prevent rotation of 3D Shape, can you provide more information about what you mean?
I mean locking angle features(toggle) of 3d shape with 3d physics behavior enabled. I was trying to make custom physics control to the 3d shape and I added if key down -> apply impulse. But it seems that when this 3d shape collide with immovable 3d physics surface its angle also changes.
I see. I'll add it to the list.
Absolutely brilliant stuff, I especially love the raycast feature.
Thank you, if you doing something fun with let me know!
That paid version and all those features is an auto buy. 50-100 dollars is a fair price if 3d Object can rotate on all axis.
3D Object will be able to rotate on all axis, figuring out collision options for 3DObject: manual sized sphere, box, automatically sized sphere box (based on initial bounding box, I don't think dynamically updated)
More advanced (and heavier perf) cylinder:
const radiusTop = 0.5
const radiusBottom = 0.5
const height = 2
const numSegments = 12 (more, more perf)
const cylinderShape = new CANNON.Cylinder(radiusTop, radiusBottom, height, numSegments)
Would buy this so fast just for the raycast alone.
Incredibly exciting. Love your 3DObject already, so this is going to be a gamechanger.
🔥🔥🔥
its gonna be more great if can work with your 3D Object plugin, amazing work!
Your are genious man! I am very thankful that you have your attention on 3d physics too. I am really excited to see more updates on future. You are doing great man.