Masty88
November 15, 2022, 9:39am
1
Hi,
I have some questions about ammoJs kinematic controller. I have already read all the threads in the forum about and @Cedric answer:
@MackeyK24 On aside, do you know how to detect collisions between a kinematic character controller and a rigid body? The normal methods don’t seem to be doing for me via:
export const setupContactPairResultCallback = (Ammo) => {
const cbContactPairResult = new Ammo.ConcreteContactResultCallback()
//@ts-ignore
cbContactPairResult.hasContact = false
/*
for each contact point search:
cbContactPairResult = callback object (results) for contactPairTest
addSingleResult = metho…
I’m trying to create a controller on my side referring to
Hi,
i am trying to get the Ammo KinematicCharacterController to work with my Babylon Project.
I must do something wrong, because the KinematicCharacterController does not collide with other meshes in my scene. Here is a example where it should collide with the ground mesh: Ammo Kinematic Character Test
Any idea what i missed?
Regards
Stefan
My first question is What controllerK.setUseGhostSweepTest(false) do because according to one post should be set to true but in my case when is set to true object fall down ?
Second question actually the mesh is still overhead and i cant turn it when i turn it her position.y is to high .
Can someone help me many thanks
Cedric
November 15, 2022, 1:41pm
2
Hi @Masty88
I think the quaternion components (x,y,z,w) are not in the same order. Once changed it looks better :
Regarding the setUseGhostSweepTest, I have no idea and a simple Google search didn’t bring anything interesting in the first pages.
2 Likes
Masty88
November 15, 2022, 1:59pm
3
Thank you it was just this i’m not to strong on quaternion…i post here an interesting thread from three.js forum where there are a lot of information regardig ammo kinematic_
in fact if i have understand well object fall because my ground is not a kinematic object but just a static object so for the moment i will set the to false and when i have time i will test
arcman7
November 16, 2022, 8:45pm
4
My first question is What controllerK.setUseGhostSweepTest(false) do because according to one post should be set to true but in my case when is set to true object fall down ?
I think the answers you’re after live here:
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H
#define BT_KINEMATIC_CHARACTER_CONTROLLER_H
#include "LinearMath/btVector3.h"
This file has been truncated. show original
and here:
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <stdio.h>
#include "LinearMath/btIDebugDraw.h"
#include "BulletCollision/CollisionDispatch/btGhostObject.h"
#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
This file has been truncated. show original
But I am not smart enough to summarize it
1 Like