Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8360783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:32:58+00:00 2026-06-09T11:32:58+00:00

In transformPosition method we can apply angle for specific sprite as given below; [sprite

  • 0

In transformPosition method we can apply angle for specific sprite as given below;

[sprite transformPosition:ccpAdd(sprite.position,
ccpMult(ccpForAngle(angle), ANY_VELOCITY))];

Is it possible to use angle and velocity in ApplyLinearImpulse Method’s parameter and how?
Below is normal declaration of that method. Can we replace that b2Vec2(90, 0) by some angle and velocity as we used above?

body->ApplyLinearImpulse(b2Vec2(90, 0), body->GetWorldCenter());
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:32:59+00:00Added an answer on June 9, 2026 at 11:32 am

    Sure, you can do something really similar to what you did up there:

    CGPoint angleVector = ccpForAngle(angle);
    body->ApplyLinearImpulse(b2Vec2(angleVector.x*ANY_VELOCITY, angleVector.y*ANY_VELOCITY), body->GetWorldCenter());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i need to shoot my sprite..i use below code -(void)shooter { LHSprite* laserSprite
I'm trying to use the Physics.Raycast method, but I get errors saying: The best
I have a parent scene node in my engine, and a child. child's transform(position,
function LateUpdate () { if (isCameraInputIgnored() ) { return; } if (target && Input.GetMouseButton(0))
Having a slight c# problem here. I'm currently coding a small platformer-game with Unity
I'm starting my development using Unity. I'm doing something like that: if(Input.GetKey(KeyCode.A))newValues[1]-=this.turnSpeed*(float)Time.deltaTime; if(Input.GetKey(KeyCode.D))newValues[1]+=this.turnSpeed*(float)Time.deltaTime; transform.Rotate(0,
I've created a basic HUD radar system based on 3D objects (Plane), the script
I would like to associate the same script to different empty objects I just
I am having trouble keeping game objects inside of a contained space. When they
I am newbie on Unity 3d.I have started practising with a snake game. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.