Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

788 Good

About Noxil

  • Rank

Personal Information

  • Role
  • Interests
  1. Noxil

    if constexpr, C++17

    As a final note, i ran "Repair" from the Visual Studio installer. Now everything seems to work. So there was indeed something fishy with my environment.
  2. Noxil

    if constexpr, C++17

    Okey so im at work right now, created a small test project and everything works fine. So i assume there is something wrong in my environment...
  3. Noxil

    if constexpr, C++17

    I tried that, and also i have tried to set the language to latest instead of C++17 to really ensure that the features are enabled at its fullest, but it dosnt seem to work.
  4. Noxil

    if constexpr, C++17

    I dont see any other errors and the code i posted is the minimum i can boil it down to. Im sure there is something, since im clearly getting the problem, but i just cant see what it could be I enabled someform of more verbose build log and i see this as my build line. cl /c /ZI /W3 /WX- /diagnostics:classic /sdl /Od /D _DEBUG /D _WINDOWS /D PMPLATFORM_WINDOWS /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Fo"x64\Debug\\" /Fd"x64\Debug\vc141.pdb" /Gd /TP /errorReport:prompt Src\Main.cpp Kinda heavy i think but its the default basically with C++17 enabled. edit: the command line there is from a windows project, i copied from the wrong project, but it dident work there either...
  5. Hey So i have been tinkering alot with the features of C++17 and i think there are some really nice things that have been added. But i ran into a problem. template< class T > void test() { if constexpr( std::is_void_v<T> ) { T * t; } else { T t; } } int main() { test< void >(); return 0; } Here i expect the compiler to tell me everything is ok and simply skip the else branch. Since i never call the function "test" with something that isnt a void. I assume i would only reach the point "T *t". But thats not the case, im using the very latest version of Visual Studio, 15.5.5. I have in my project enabled the C++17 language standard and also enabled the conformance mode (/permissive-) Yet Visual Studio is telling me "illegal use of type 'void'" which of course is correct if i ever where to reach that branch. Am i just not understanding how its supposed to work? Any help would be greatly appreciated
  6. Noxil

    Bullet - btGhostObject

    I think for now, im going to simply solve my problem by not allowing triggers to take action for the first frame they are alive. Sure... Not the best option, but atleast i can move forward for now. So to sum it up, i thought i had a problem with btGhostObject. It turned out to be a problem with teleporting objects instead. Thanks for all the help
  7. Noxil

    Bullet - btGhostObject

    Thanks for explaning. Tinkering with the code, i think im starting to understand what the actuall problem is... If i put a log inside the loop i get a hit the first frame, then i stop getting hits. So im thinking im doing something wrong when im trying to transform the btRigidBody. This is my naive approach btTransform world( btQuaternion(p_Rotation.yaw, p_Rotation.pitch, p_Rotation.roll), btVector3(p_Location.x, p_Location.y, p_Location.z) ); m_Body->setWorldTransform( world ); m_Body->getMotionState()->setWorldTransform( world );
  8. Noxil

    Bullet - btGhostObject

    Right now, im not doing anything. Is my understanding wrong here. Shouldnt i only get overlapping pairs when the AABBs intersect?
  9. Noxil

    Bullet - btGhostObject

    Yeah, all the informaiton i can find seem to say that im doing it right. But yet it yeilds strange results I read abit about the contact callback thing. But i felt hesitant towards it, since even Bullet says the preferred way is to use ghost objects. Guess i have to do some experiments with it and see what happens
  10. Noxil

    Bullet - btGhostObject

    Hello, I have googled and for quite some time now and i seem to only find the same type of answer. And the result im getting is so strange. The goal is to create a trigger volume (for now a box) that should trigger events whenever something enters it. According to the Bullet, btGhostObject is the way to go for simple triggers. This is my code for setting up bullet. m_BulletBroadphase = new btDbvtBroadphase(); m_BulletConfiguration = new btDefaultCollisionConfiguration(); m_BulletDispatcher = new btCollisionDispatcher( m_BulletConfiguration ); m_BulletSolver = new btSequentialImpulseConstraintSolver; m_BulletDynamicsWorld = new btDiscreteDynamicsWorld( m_BulletDispatcher, m_BulletBroadphase, m_BulletSolver, m_BulletConfiguration ); m_BulletDynamicsWorld->setGravity( btVector3(0.0f, -50.0f, 0.0f) ); m_BulletDynamicsWorld->getPairCache()->setInternalGhostPairCallback( new btGhostPairCallback() ); btGhostObject // create trigger volume btTransform world( btQuaternion(rotation.yaw, rotation.pitch, rotation.roll), btVector3(location.x, location.y, location.z) ); m_GhostObject = new btGhostObject(); m_GhostObject->setCollisionShape( new btBoxShape(btVector3(10.0f, 5.0f, 10.0f)) ); m_GhostObject->setWorldTransform( world ); getGameWorld()->getBulletDynamicWorld()->addCollisionObject( m_GhostObject ); .... // check for intersections btAlignedObjectArray< btCollisionObject * > & pairs = m_GhostObject->getOverlappingPairs(); for( pmInt32 i=0; i<pairs.size(); ++i ) { .... } And finally, the object that i use to test the trigger with btDefaultMotionState * motionState = new btDefaultMotionState(); btVector3 inertia; m_Shape = new btBoxShape(btVector3(5.0f, 5.0f, 5.0f)); m_Shape->calculateLocalInertia( m_Mass, inertia ); btRigidBody::btRigidBodyConstructionInfo rigidBodyCI( m_Mass, motionState, m_Shape, inertia ); m_Body = new btRigidBody( rigidBodyCI ); The simulation looks correct, the rigid body spawns highup in the air and falls down correctly. The btRigidBody is transformed to location(0.0f, 40.0f, 0.0f) And the trigger is transformed to location(0.0f, 5.0f, 0.0) The problem im getting is that in the triggers intersection check i instantly get a overlapping pair. Even though they are really far apart and their AABBs cant intersect. I also checked their worldTransforms, they indicate that they are positioned correctly. I went as far to even set the interpolatedWorldTransform but it dident help. Have anyone else had this problem or am i just missing something basic here?
  11. Oh my... I cant thank you enough! I finally found the problem! And you where so correct in your last statement, the SKIN! So the problem was a missunderstanding on my side on how to apply the skinning correctly in the shader. I have been fighting with this problem for so long now. There are so many places where things can go wrong, export, import, interpolations, rigs, heirarchies etc etc. What helped me the most was the fact that you posted images from your engine showing my mesh. Thank you so much!
  12. If that is your result then you get the same result as i do. My keyframe in maya it rotates to about 90 degree This is frame 30 for me. So im assuming i have done something really wrong in maya then! Edit: So hmm if it works for you, then yeah it must be the skin then i guess. Thank you for trying it out
  13. Thanks for pointing this out DonDickieD. These are my main matrix functions. Perhaps i have done something wrong here? void matrixCreateTransform( Matrix4v4 * p_Result, const Vec3f & p_Translation, const Vec3f & p_Scale, const Quaternion & p_Rotation ) { XMMATRIX translation = XMMatrixTranslation( p_Translation.x, p_Translation.y, p_Translation.z ); XMMATRIX scale = XMMatrixScaling( p_Scale.x, p_Scale.y, p_Scale.z ); XMMATRIX rotation = XMMatrixRotationQuaternion( makeVectorRegister(p_Rotation.axis.x, p_Rotation.axis.y, p_Rotation.axis.z, p_Rotation.amount) ); XMMATRIX m = XMMatrixMultiply( scale, rotation ); XMStoreFloat4x4A( (XMFLOAT4X4A *)p_Result, XMMatrixMultiply(m, translation) ); } void matrixMultiply( Matrix4v4 * p_Result, const Matrix4v4 * p_A, const Matrix4v4 * p_B ) { XMMATRIX a = XMLoadFloat4x4A( (const XMFLOAT4X4A *)p_A ); XMMATRIX b = XMLoadFloat4x4A( (const XMFLOAT4X4A *)p_B ); XMMATRIX r = XMMatrixMultiply( a, b ); XMStoreFloat4x4A( (XMFLOAT4X4A *)p_Result, r ); }
  14. So i have tried some euler to quaternion with no success. I get a another type of rotation, it dosnt rotate from the root bone any more but just slighly bends in the middle instead. It looks further away from the direction i should be heading if i compare to the quaternion rotation. But im not quite sure that i got it all right. I did the quaternion multiplications myself, aswell as to use the DX11 function "XMQuaternionRotationRollPitchYaw". They both gave the same result. It feels like the quaternion i get from "GetQ" using "boneNode->EvaluateLocalTransform(time)" is not the correct value or something. When i load the frames and extract the quaternion in my engine. If i multiply the w component with 2.0f the animation seems to rotate almost to the point where it should.
  15. Thank you both for your replies, i will make some tests regarding your posts. As per request from ongamex92 i have attached the maya file and fbx file. Edit: Reuploaded .mlt file, it hade unsaved changes (dont know what they where) anim_scene.fbx anim_test.mlt
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!