Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SFML Blueprints Chapter 4 : Maxime Barbier #13

Open
yeokaiwei opened this issue Jan 19, 2023 · 1 comment
Open

[BUG] SFML Blueprints Chapter 4 : Maxime Barbier #13

yeokaiwei opened this issue Jan 19, 2023 · 1 comment

Comments

@yeokaiwei
Copy link

Hi Maxime,
Thanks for writing your book, SFML Blueprints.

I was going through Chapter 4 when I encountered the following problems.

Error (active)	E0413	no suitable conversion function from "b2BodyUserData" to "sf::Shape *" exists	

Error	C2440	'static_cast': cannot convert from 'b2BodyUserData' to 'sf::Shape *'

Capture

May I ask how to solve the above problems?

Thank you.

@Przemekkkth
Copy link

Hi @yeokaiwei ,
please try this:
sf::Shape* shape = reinterpret_cast<sf::Shape*>(body->GetUserData().pointer)
this code is newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants