on 17-05-2012 02:21 PM
Hi,
I want to use Box2D physics engine for my game. Box2D is not written in C# but there are some ports available. Box2DX is outdated (no Fixtures etc.) and Farseers Physics Engine seems to be slow (http://community.eu.playstation.com/t5/General/Phy
Then I found Box2CS (http://code.google.com/p/box2c/). It's a wrapper around the original C++ Box2D. Sounds good: Fast and up to date.
But as soon as I try to create a new World ( mWorld = new World(gravity, true); ) I get the following exception:
System.MethodAccessException: Attempt to access a private/protected method failed. at System.Security.SecurityManager.ThrowException (System.Exception ex) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) Box2CS.World/NativeMethods:b2world_constructor (Box2CS.Vec2,bool) at Box2CS.World..ctor (Vec2 gravity, Boolean doSleep) [0x00000] in <filename unknown>:0
Does anyone now what I could do to get Box2CS work?
Thanks,
Wolfgang
on 17-05-2012 03:20 PM
Thats the problem, you can't invoke native code, so a wrapper around a C++ library simply isn't going to work.
Try this one ( http://code.google.com/p/box2dx/ ), it appears to be a pure C# implementation.
Download it, compile it as a PS Suite library and see how that goes.
on 17-05-2012 03:33 PM
Thanks for your answere. I already have tried Box2DX. Unfortunately it's an old version (no Fixtures, no kinematic bodies). I will give Box2D.XNA an(other) try.
on 17-05-2012 04:13 PM
Actually I did some testing and Box2dx uses unsafe code anyways, which will compile on PSS but not run.
on 17-05-2012 06:25 PM
on 17-05-2012 09:49 PM
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870