Skip to content

Can't access bullet module from rigidbody module #487

@DruggedBunny

Description

@DruggedBunny

Hi Mark,

Hope you're well.

Not sure if anything more is intended for mx2 now (suspect not?), but I'm attempting to add a New RigidBody method to pass in btRigidBodyConstructionInfo, inside modules/mojo3d/scene/components/rigidbody.monkey2.

However, on rebuilding mojo3d with the additional New below, mx2 doesn't complain, but the C++ compiler does...

	Method New( entity:Entity, constructionInfo:btRigidBodyConstructionInfo )
		
		Super.New( entity,Type )
		
		_btmotion=New MotionState( entity )
		
		_btbody=New btRigidBody( constructionInfo )
		
		Kinematic=False
		Restitution=0
		Friction=1
		RollingFriction=0
		CollisionGroup=1
		CollisionMask=1
		
		AddInstance()
	End

Error message suggests it can't locate btRigidBodyConstructionInfo on the C++ side (mx2 doesn't seem to mind!)...

Mx2cc version 1.1.15

***** Making module 'mojo3d' (windows release x64 msvc mx) *****

Parsing...
Semanting...
Translating...
Compiling...
Build error: System command failed:

cl -c -EHs -W0 -MT -utf-8 -bigobj -O2 -DNDEBUG -I"D:/DevTools/Monkey2/monkey2/modules/" -I"D:/DevTools/Monkey2/monkey2/modules/monkey/native" -I"D:/DevTools/Monkey2/monkey2/modules/bullet/bullet3-2.85.1/src/" -I"D:/DevTools/Monkey2/monkey2/modules/freetype/freetype-2.6.3/include/" -I"D:/DevTools/Monkey2/monkey2/modules/openal/openal-soft/include/" -I"D:/DevTools/Monkey2/monkey2/modules/sdl2/SDL/include/" -I"D:/DevTools/Monkey2/monkey2/modules/zlib/zlib-1.2.11/" -DNDEBUG=1 -DBB_THREADS=1 -showIncludes -Fo"D:/DevTools/Monkey2/monkey2/modules/mojo3d/mojo3d.buildv1.1.15/windows_release_msvc_x64_mx/build/jointfa856ede.cpp.obj" "D:/DevTools/Monkey2/monkey2/modules/mojo3d/mojo3d.buildv1.1.15/windows_release_msvc_x64_mx/src/mojo3d_scene_2components_2joint.cpp" >tmp/stdout1.txt

mojo3d_scene_2components_2joint.cpp
D:/DevTools/Monkey2/monkey2/modules/mojo3d/mojo3d.buildv1.1.15/windows_release_msvc_x64_mx/include/mojo3d_scene_2components_2rigidbody.h(61): error C2061: syntax error: identifier 'btRigidBodyConstructionInfo'
D:/DevTools/Monkey2/monkey2/modules/mojo3d/mojo3d.buildv1.1.15/windows_release_msvc_x64_mx/include/mojo3d_scene_2components_2rigidbody.h(63): error C2535: 't_mojo3d_RigidBody::t_mojo3d_RigidBody(t_mojo3d_Entity *)': member function already defined or declared
D:/DevTools/Monkey2/monkey2/modules/mojo3d/mojo3d.buildv1.1.15/windows_release_msvc_x64_mx/include/mojo3d_scene_2components_2rigidbody.h(61): note: see declaration of 't_mojo3d_RigidBody::t_mojo3d_RigidBody'

Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26730 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.



***** Fatal mx2cc error *****

Internal mx2cc build error

Update modules failed.
Total time elapsed: 0 m 3 s.

I've tried amending to:

Method New( entity:Entity, constructionInfo:bullet.btRigidBodyConstructionInfo )

... but this fails with:

Mx2cc version 1.1.15

***** Making module 'mojo3d' (windows release x64 msvc mx) *****

Parsing...
Semanting...
D:/DevTools/Monkey2/monkey2/modules/mojo3d/scene/components/rigidbody.monkey2 [84] : Error : Type 'mojo3d.bullet' has no member type named 'btRigidBodyConstructionInfo'

Update modules failed.
Total time elapsed: 0 m 1 s.

... like it's trying to access mojo3d.bullet instead of the base bullet module. I can't see any way to specify the base bullet module in the docs either, rather than looking in the current namespace.

Is there any way to do this?

(Also, how officially dead or otherwise is mx2?? I see SDL was recently updated!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions