Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Custom scaling in physics editor of codeandweb
Started by DevilDev May 20 2018 08:06 PM

* * * * * 1 votes
2 replies to this topic
physics editor custom scaling shape

Best Answer ldurniat , 22 May 2018 - 09:40 AM

I have created modified version of built-in exporter for Corona SDK. It adds new paramaters xScale and yScale for individual body (image). it is available as github project.

 

ldurniat

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

DevilDev

[GLOBAL: userInfoPane.html]
DevilDev
  • Enthusiast

  • 77 posts
  • Corona SDK

When using physics editor,there is an option to set the scaling for all objects.

But i want to use different scaling for every single object..

How to do that?

Like 

local b=require("bodies").physicsData(xscale,yscale)
local c=.............
physics.addBody(c,b:get("object_name").physicsData(xSacle,yScale)
--Where c is a display object like fruit,platform.etc...
---When we pass the name of the object along with custom scaling,the body with that scaling should return


[TOPIC: post.html]
#2

ldurniat

[GLOBAL: userInfoPane.html]
ldurniat
  • Contributor

  • 403 posts
  • Corona SDK

  Best Answer

I have created modified version of built-in exporter for Corona SDK. It adds new paramaters xScale and yScale for individual body (image). it is available as github project.

 

ldurniat



[TOPIC: post.html]
#3

DevilDev

[GLOBAL: userInfoPane.html]
DevilDev
  • Enthusiast

  • 77 posts
  • Corona SDK

Thanks bro...I am gonna use it now.......!




[topic_controls]
[/topic_controls]