Forums

OverviewV-Play 2 Support (Qt 5)Antialiasing › Reply To: Antialiasing

OverviewV-Play 2 Support (Qt 5)Antialiasing › Reply To: Antialiasing
#9711

Tobias

I have already tried this. -> nothing changed

EntityBase {
id: plate
entityId: “plate”
entityType: “t_plate”
x: 100
y: 100

antialiasing: true

height: plate_collider.height
width: plate_collider.width
transformOrigin: Item.TopLeft
MultiResolutionImage {
id: plateImage
source: “qrc:///imgs/plate/plate.png”
width: plate.width
height: plate.height * 4
x: -plate.width/2
y: -gameWindow.step * 2

antialiasing: true
}

property double originX: gameScene.width/5 //+ plate.width/2// * 2.5
property double originY: gameScene.height – (ground.anchors.bottomMargin + ground.height – plate.height*0.55)
property double bounce_height: gameWindow.step * defs.plate_bounce_height
property double bounce_radius: bounce_height*2
property double bounce_default_speed: – bounce_height / defs.plate_bounce_time_default

BoxCollider {
id: plate_collider
x: -plate.width/2
y: -plate.height/2
width: hero.width * 2
height: gameWindow.step
categories: Box.Category4
collidesWith: Box.Category2
friction: 0
restitution: 0
bodyType: Body.Kinematic

antialiasing: true
}

onYChanged: {
if(y < originY-bounce_height)//(gameScene.height – (ground.anchors.bottomMargin + ground.height + bounce_height)))
{
plate_collider.linearVelocity.y = -bounce_default_speed //-plate_collider.linearVelocity.y
}
else
{
if(y > originY)//gameScene.height – (ground.anchors.bottomMargin + ground.height))
{
plate_collider.linearVelocity.y = 0
y = originY//gameScene.height – (ground.anchors.bottomMargin + ground.height)
}
}
var dx = (1 – Math.sqrt(1 – Math.pow((originY-y)/bounce_radius , 2 ) ))
x = originX + bounce_radius * dx
console.log( Math.asin(dx)*180/Math.PI )
rotation= Math.asin(dx)*180/Math.PI
}
}

  • This reply was modified 3 years ago by  Terry86.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support